 | numeric-prelude-0.0.2: An experimental alternative hierarchy of numeric type classes | Contents | Index |
|
Number.Peano | Portability | portable | Stability | provisional | Maintainer | numericprelude@henning-thielemann.de |
|
|
|
|
|
Description |
Lazy Peano numbers represent natural numbers inclusive infinity.
Since they are lazily evaluated,
they are optimally for use as number type of genericLength et.al.
|
|
Synopsis |
|
| | infinity :: T | | err :: String -> String -> a | | add :: T -> T -> T | | sub :: T -> T -> T | | subNeg :: T -> T -> (Bool, T) | | isAscending :: [T] -> Bool | | mul :: T -> T -> T | | fromPosEnum :: (C a, Enum a) => a -> T | | toPosEnum :: (C a, Enum a) => T -> a | | argMinFull :: (T, a) -> (T, a) -> (T, a) | | argMin :: (T, a) -> (T, a) -> a | | argMinimum :: [(T, a)] -> a | | argMaxFull :: (T, a) -> (T, a) -> (T, a) | | argMax :: (T, a) -> (T, a) -> a | | argMaximum :: [(T, a)] -> a | | legacyInstance :: a |
|
|
Documentation |
|
data T |
Constructors | | Instances | |
|
|
infinity :: T |
|
err :: String -> String -> a |
|
add :: T -> T -> T |
|
sub :: T -> T -> T |
|
subNeg :: T -> T -> (Bool, T) |
|
isAscending :: [T] -> Bool |
|
mul :: T -> T -> T |
|
fromPosEnum :: (C a, Enum a) => a -> T |
|
toPosEnum :: (C a, Enum a) => T -> a |
|
argMinFull :: (T, a) -> (T, a) -> (T, a) |
cf.
To how to find the shortest list in a list of lists efficiently,
this means, also in the presence of infinite lists.
http://www.haskell.org/pipermail/haskell-cafe/2006-October/018753.html
|
|
argMin :: (T, a) -> (T, a) -> a |
On equality the first operand is returned.
|
|
argMinimum :: [(T, a)] -> a |
|
argMaxFull :: (T, a) -> (T, a) -> (T, a) |
|
argMax :: (T, a) -> (T, a) -> a |
On equality the first operand is returned.
|
|
argMaximum :: [(T, a)] -> a |
|
legacyInstance :: a |
|
Produced by Haddock version 0.7 |