bimap

Maps one function over each side of a Bifunctor.

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.

Signature

bimap(bifunctor, transformLeft, transformRight)
forall F, a, b, c, d:
  (F a b, (a) => c, (b) => d) => F c d
where F is Bifunctor

Documentation

Maps one function over each side of a Bifunctor.

Properties

Convenience

curried()

Maps one function over each side of a Bifunctor.

Experimental
infix(transformLeft, transformRight)

Maps one function over each side of a Bifunctor.

Experimental

Source Code

Defined in source/fantasy-land/bimap.js at line 31, column 0
(bifunctor, transformLeft, transformRight) =>
  isNew(bifunctor) ?  bifunctor[flBimap](transformLeft, transformRight)
: isOld(bifunctor) ?  warn(bifunctor.bimap(transformLeft, transformRight))
: /*otherwise*/       unsupported(bifunctor)
Stability
experimental
Licence
MIT
Module
folktale/fantasy-land/bimap
Authors
Copyright
(c) 2013-2017 Quildreen Motta, and CONTRIBUTORS
Authors
  • @boris-marinov
  • Quildreen Motta
Maintainers
  • Quildreen Motta <queen@robotlolita.me> (http://robotlolita.me/)