module folktale/fantasy-land

Allows invoking methods of Fantasy Land structures without worrying about the differences in multiple versions of the spec implemented by different libraries. You may want to use this instead of calling the methods directly if you're writing generic functions to work with any fantasy-land library.

This feature is experimental!

This API is still experimental, so it may change or be removed in future versions. You should not rely on it for production applications.

Documentation

Allows invoking methods of Fantasy Land structures without worrying about the differences in multiple versions of the spec implemented by different libraries. You may want to use this instead of calling the methods directly if you're writing generic functions to work with any fantasy-land library.

Properties

Applicative

apply(applicativeFunction, applicativeValue)

Applies the function inside an applicative to the value of another applicative.

Experimental
of(applicative, value)

Constructs an applicative containing the given value.

Experimental

Bifunctor

bimap(bifunctor, transformLeft, transformRight)

Maps one function over each side of a Bifunctor.

Experimental

Convenience

curried

Curried versions of the fantasy-land functions.

Experimental
infix

Method versions of the fantasy-land functions, supporting the structure::fn(...) syntax.

Experimental

Functor

map(functor, transformation)

Transforms the contents of a Functor.

Experimental

Monad

chain(monad, transformation)

Transforms a monad with an unary function.

Experimental

Monoid

empty(monoid)

Returns the identity object for a monoid.

Experimental

Semigroup

concat(semigroupLeft, semigroupRight)

Joins two semigroups.

Experimental

Setoid

equals(setoidLeft, setoidRight)

Compares two setoids for equality.

Experimental

Source Code

Defined in source/fantasy-land/index.js at line 14, column 0
{
  apply: require('./apply'),
  concat: require('./concat'),
  chain: require('./chain'),
  empty: require('./empty'),
  map: require('./map'),
  of: require('./of'),
  equals: require('./equals'),
  bimap: require('./bimap'),
  curried: require('./curried'),
  infix: require('./infix')
}
Stability
experimental
Licence
MIT
Module
folktale/fantasy-land
Authors
Copyright
(c) 2013-2017 Quildreen Motta, and CONTRIBUTORS
Authors
  • Quildreen Motta
Maintainers
  • Quildreen Motta <queen@robotlolita.me> (http://robotlolita.me/)