Copyright | (c) Colin Woodbury 2015 - 2020 |
---|---|
License | BSD3 |
Maintainer | Colin Woodbury <colin@fosskers.ca> |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- letter :: (ℤ / 26) -> Char
- int :: Char -> ℤ / 26
- inverse :: (ℤ / 26) -> ℤ / 26
- prng :: IO SystemRNG
- rseq :: CPRG g => g -> Integer -> [Integer]
- mapInverse :: (Ord k, Ord v) => Map k v -> Map v k
- compose :: (Ord k, Ord v) => Map k v -> Map v v' -> Map k v'
- (|.|) :: (Ord k, Ord v) => Map k v -> Map v v' -> Map k v'
- uniZip :: [a] -> [(a, a)]
- stretch :: [a] -> [a]
- both :: (a -> b) -> (a, a) -> (b, b)
Character Conversion
Modular Arithmetic
Random Numbers
rseq :: CPRG g => g -> Integer -> [Integer] Source #
The sequence (r1,...r[n-1]) of numbers such that r[i] is an independent sample from a uniform random distribution [0..n-i]
Map function
mapInverse :: (Ord k, Ord v) => Map k v -> Map v k Source #
Invert a Map. Keys become values, values become keys. Note that this operation may result in a smaller Map than the original.
compose :: (Ord k, Ord v) => Map k v -> Map v v' -> Map k v' Source #
Compose two Maps. If some key v
isn't present in the second
Map, then k
will be left out of the result.
2015 April 16 @ 13:56 Would it be possible to make a Category for Map like this?
(|.|) :: (Ord k, Ord v) => Map k v -> Map v v' -> Map k v' Source #
An alias for compose. Works left-to-right.
Miscellaneous
uniZip :: [a] -> [(a, a)] Source #
Zip a list on itself. Takes pairs of values and forms a tuple. Example:
>>>
uniZip [1,2,3,4,5,6]
[(1,2),(3,4),(5,6)]