These are chat archives for got-lambda/expression
The online hangout for Göteborg Functional Programming Group and everybody interested.
div : Nat -> Natthat raises error, a total implementation that requires you to carry a proof with
divNatNZ, and an "absorbing" version for doubles with
λΠ> 1.0 / 0.0 Infinity : Double
λΠ> 0.0 / 0.0 NaN : Double
λΠ> :type Type Type : Type 1
Num -> Num -> Maybe Numinstead of having a num with a built-in representation of NaN and Infinity?
show ratingto the user, which might see "NaN", instead of "Be the first to rate this product."
Maybe Number. But if you have a number
fromMaybe PositiveInfinity (x / y).
fromMaybe PositiveInfinity $ map Double $ (x / y)if x and y are plain numbers.
(/) :: Double -> Double -> Maybe Double.
filterMap idin PureScript.
+ : Maybe a -> Maybe a -> Maybe a
plusPrime = map (+).
score /? countis pretty nice.
take (1 / 0)because the numeric tower in Haskell makes it not an Int
Number -> Maybe String??? :p
show $ showNumberthen you say you want to print Nothing :p