2.0.1 • Published 4 years ago
@frisby/core v2.0.1
@frisby/core
Core functional programming functions.
Installing
@frisby/core can be installed through npm or yarn:
$ npm install @frisby/core
$ yarn add @frisby/core
Usage
Import the functions that you want to use from @frisby/core. @frisby/core supports tree-shake.
import { compose, map } from @frisby/core
Docs
curry
// curry :: ((a, b, ...) -> c) -> a -> b -> ... -> c
compose
// compose :: ((a -> b), (b -> c), ..., (y -> z)) -> a -> z
always
// always :: a -> b -> a
identity
// identity :: x -> x
trace
// trace :: String -> a -> a
map
// map :: (a -> b) -> [a] -> [b]
filter
// filter :: (a -> Bool) -> [a] -> [a]
reduce
// reduce :: (b -> a -> b) -> b -> [a] -> b