Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A cheatsheet to have the fantasy land algebraic specification at a glance

Fantasy Land Specification Cheatsheet

Algebras

Algebra Methods
Functor map
Apply ap, map
Applicative of, ap, map
Chain chain, ap, map
Monad chain, of, ap, map
Bifunctor bimap, map
Profunctor promap, map
Extend extend, map
Comonad extract, extend, map
Foldable reduce
Traversable traverse, reduce, map
Semigroupoid compose
Category id, compose
Semigroup concat
Monoid empty, concat
Setoid equals
Ord lte, equals

More

Alt, Plus, Alternative, Contravariant

Methods

map :: Functor f => f a ~> (a -> b) -> f b
ap :: Apply f => f a ~> f (a -> b) -> f b
of :: Applicative f => a -> f a
chain :: Chain m => m a ~> (a -> m b) -> m b
bimap :: Bifunctor f => f a c ~> (a -> b, c -> d) -> f b d
promap :: Profunctor p => p b c ~> (a -> b, c -> d) -> p a d
extend :: Extend w => w a ~> (w a -> b) -> w b
extract :: Comonad w => w a ~> () -> a
reduce :: Foldable f => f a ~> ((b, a) -> b, b) -> b
traverse :: Applicative f, Traversable t => t a ~> (TypeRep f, a -> f b) -> f (t b)
compose :: Semigroupoid c => c i j ~> c j k -> c i k
id :: Category c => () -> c a a
concat :: Semigroup a => a ~> a -> a
empty :: Monoid m => () -> m
equals :: Setoid a => a ~> a -> Boolean
lte :: Ord a => a ~> a -> Boolean

Dependencies

Dependencies

@andys8

This comment has been minimized.

Copy link
Owner Author

@andys8 andys8 commented Aug 6, 2017

dependencies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment