(String | Integer) -> a -> (Object | Array) -> (Object | Array)
crocks/helpers/assoc
binary
((*) -> c) -> a -> b -> c
crocks/helpers/binary
branch
a -> Pair a a
crocks/Pair/branch
compose
((y -> z), ..., (a -> b)) -> a -> z
crocks/helpers/compose
composeK
Chain m => ((y -> m z), ..., (a -> m b)) -> a -> m z
crocks/helpers/composeK
composeP
Promise p => ((y -> p z c), ..., (a -> p b c)) -> a -> p z c
crocks/helpers/composeP
composeS
Semigroupoid s => (s y z, ..., s a b) -> s a z
crocks/helpers/composeS
curry
((a, b, ...) -> z) -> a -> b -> ... -> z
crocks/helpers/curry
defaultProps
Object -> Object -> Object
crocks/helpers/defaultProps
defaultTo
a -> b -> a
crocks/helpers/defaultTo
dissoc
(String | Integer) -> a -> a
crocks/helpers/dissoc
fanout
(a -> b) -> (a -> c) -> (a -> Pair b c)
crocks/Pair/fanout
find
Foldable f => ((a -> Boolean) | Pred) -> f a -> Maybe a
crocks/Maybe/find
fromPairs
Foldable f => f (Pair String a) -> Object
crocks/helpers/fromPairs
getPath
[ (String | Integer) ] -> a -> Maybe b
crocks/Maybe/getPath
getPathOr
a -> f [ (String | Integer) ] -> b -> a
crocks/helpers/getPathOr
getProp
(String | Integer) -> a -> Maybe b
crocks/Maybe/getProp
getPropOr
a -> (String | Integer) -> b -> c
crocks/helpers/getPropOr
liftA2
Applicative m => (a -> b -> c) -> m a -> m b -> m c
crocks/helpers/liftA2
liftA3
Applicative m => (a -> b -> c -> d) -> m a -> m b -> m c -> m d
crocks/helpers/liftA3
liftN
Applicative m => Number -> ((*) -> a) -> (*m) -> m a
crocks/helpers/liftN
mapProps
Object -> Object -> Object
crocks/helpers/mapProps
mapReduce
Foldable f => (a -> b) -> (c -> b -> c) -> c -> f a -> c
crocks/helpers/mapReduce
mconcat
Monoid m, Foldable f => m -> f a -> m a
crocks/helpers/mconcat
mconcatMap
Monoid m, Foldable f => m -> (b -> a) -> f b -> m a
crocks/helpers/mconcatMap
mreduce
Monoid m, Foldable f => m -> f a -> a
crocks/helpers/mreduce
mreduceMap
Monoid m, Foldable f => m -> (b -> a) -> f b -> a
crocks/helpers/mreduceMap
nAry
Number -> ((*) -> a) -> (*) -> a
crocks/helpers/nAry
objOf
String -> a -> Object
crocks/helpers/objOf
omit
[ String ] -> Object -> Object
crocks/helpers/omit
once
((*) -> a) -> ((*) -> a)
crocks/helpers/once
partial
(((*) -> c), *) -> (*) -> c
crocks/helpers/partial
pick
Foldable f => f String -> Object -> Object
crocks/helpers/pick
pipe
((a -> b), ..., (y -> z)) -> a -> z
crocks/helpers/pipe
pipeK
Chain m => ((a -> m b), ..., (y -> m z)) -> a -> m z
crocks/helpers/pipeK
pipeP
Promise p => ((a -> p b d), ..., (y -> p z d)) -> a -> p z d
crocks/helpers/pipeP
pipeS
Semigroupoid s => (s a b, ..., s y z) -> s a z
crocks/helpers/pipeS
prop
(String | Integer) -> a -> Maybe b
crocks/Maybe/prop
propOr
a -> (String | Integer) -> b -> c
crocks/helpers/propOr
propPath
[ (String | Integer) ] -> a -> Maybe b
crocks/Maybe/propPath
propPathOr
a -> [ (String | Integer) ] -> b -> a
crocks/helpers/propPathOr
safe
((a -> Boolean) | Pred) -> a -> Maybe a
crocks/Maybe/safe
safeAfter
safeAfter :: ((b -> Boolean) | Pred) -> (a -> b) -> a -> Maybe b
crocks/Maybe/safeAfter
safeLift
((a -> Boolean) | Pred) -> (a -> b) -> a -> Maybe b
crocks/Maybe/safeLift
setPath
[ (String | Integer) ] -> a -> (Object | Array) -> (Object | Array)
crocks/helpers/setPath
setProp
(String | Integer) -> a -> (Object | Array) -> (Object | Array)
crocks/helpers/setProp
tap
(a -> b) -> a -> a
crocks/helpers/tap
toPairs
Object -> List (Pair String a)
crocks/Pair/toPairs
tryCatch
((*) -> b) -> (*) -> Result e b
crocks/Result/tryCatch
unary
((*) -> b) -> a -> b
crocks/helpers/unary
unit
() -> undefined
crocks/helpers/unit
unsetPath
[ (String | Integer) ] -> a -> a
crocks/helpers/unsetPath
unsetProp
(String | Integer) -> a -> a
crocks/helpers/unsetProp
Every function in crocks
, that takes a predicate function of the form a -> Boolean
, can be replaced with a Pred instance of the type: Pred a
and vice-versa
Function | Signature | Location |
---|---|---|
and | (a -> Boolean) -> (a -> Boolean) -> a -> Boolean | crocks/logic/and |
ifElse | (a -> Boolean) -> (a -> b) -> (a -> b) -> a -> b | crocks/logic/ifElse |
implies | (a -> Boolean) -> (a -> Boolean) -> a -> Boolean | crocks/logic/implies |
not | (a -> Boolean) -> a -> Boolean | crocks/logic/not |
or | (a -> Boolean) -> (a -> Boolean) -> a -> Boolean | crocks/logic/or |
unless | (a -> Boolean) -> (a -> a) -> a -> a | crocks/logic/unless |
when | (a -> Boolean) -> (a -> a) -> a -> a | crocks/logic/when |
Contribute on Github! Edit this section.