Safe Haskell | Safe |
---|---|
Language | Haskell98 |
- reads_exact :: Read a => String -> Maybe a
- data Case_Rule
- is_ci :: Case_Rule -> Bool
- is_cs :: Case_Rule -> Bool
- string_eq :: Case_Rule -> String -> String -> Bool
- rlookup_str :: Case_Rule -> String -> [(a, String)] -> Maybe a
- parse_enum :: (Show t, Enum t, Bounded t) => Case_Rule -> String -> Maybe t
- d_dx :: Num a => [a] -> [a]
- dx_d :: Num n => [n] -> [n]
- d_dx' :: Num n => [n] -> [n]
- dx_d' :: Num n => [n] -> [n]
- lookup_by :: (a -> a -> Bool) -> a -> [(a, b)] -> Maybe b
- rlookup_by :: (b -> b -> Bool) -> b -> [(a, b)] -> Maybe a
- pcn_triples :: [a] -> [(Maybe a, a, Maybe a)]
- sep_first :: [t] -> Maybe (t, [t])
- sep_last :: [t] -> Maybe ([t], t)
- equal_length_p :: [[a]] -> Bool
- histogram :: Ord a => [a] -> [(a, Int)]
- type T2 a = (a, a)
- type T3 a = (a, a, a)
- type T4 a = (a, a, a, a)
- dup2 :: t -> T2 t
- dup3 :: t -> T3 t
- dup4 :: t -> T4 t
- mk_duples :: (a -> c) -> (b -> c) -> [(a, b)] -> [c]
- mk_duples_l :: (Int -> c) -> (a -> c) -> (b -> c) -> [(a, [b])] -> [c]
- mk_triples :: (a -> d) -> (b -> d) -> (c -> d) -> [(a, b, c)] -> [d]
Documentation
STRING / CASE
string_eq :: Case_Rule -> String -> String -> Bool Source #
String equality with Case_Rule
.
string_eq CI "lower" "LOWER" == True
rlookup_str :: Case_Rule -> String -> [(a, String)] -> Maybe a Source #
rlookup_by
of string_eq
.
LIST
rlookup_by :: (b -> b -> Bool) -> b -> [(a, b)] -> Maybe a Source #
Reverse lookup
with equality function.
pcn_triples :: [a] -> [(Maybe a, a, Maybe a)] Source #
(prev,cur,next) triples.
pcn_triples [1..3] == [(Nothing,1,Just 2),(Just 1,2,Just 3),(Just 2,3,Nothing)]
sep_first :: [t] -> Maybe (t, [t]) Source #
Separate first list element.
sep_first "astring" == Just ('a',"string")
sep_last :: [t] -> Maybe ([t], t) Source #
Separate last list element.
sep_last "stringb" == Just ("string",'b')
equal_length_p :: [[a]] -> Bool Source #
Are lists of equal length?
equal_length_p ["t1","t2"] == True equal_length_p ["t","t1","t2"] == False
TUPLES
mk_duples_l :: (Int -> c) -> (a -> c) -> (b -> c) -> [(a, [b])] -> [c] Source #
Length prefixed list variant of mk_duples
.
mk_triples :: (a -> d) -> (b -> d) -> (c -> d) -> [(a, b, c)] -> [d] Source #
concatMap
of f at x and g at y and h at z.