0.1.4 • Published 5 years ago
@elementary/core v0.1.4
Elementary Core
Core Typeclasses and Functions governing the development of Elementary/Components
Get Started
# Install Core
$ yarn add @elementary/core
Usage
Compose
import { compose } from '@elementary/core'
compose(f, g)(val) === f(g(val)) //true
Ccompose
import { ccompose } from '@elementary/core'
compose(f, g)(functor) === functor.map(f).map(g) //true and will be iterated once only
Maybe
import { Maybe } from '@elementary/core'
Maybe().of(1).map(x => x/2) //=> 0.5
Maybe().of(null).map(x => x/2) //=> null
Api is still experimental, please don't use core's apis directly