name: free
description: Free monads are useful for many tree-like structures and domain specific languages.

If f is a Functor then the free Monad on f is the type
of trees whose nodes are labeled with the constructors of f. The word
&quot;free&quot; is used in the sense of &quot;unrestricted&quot; rather than &quot;zero-cost&quot;:
Free f makes no constraining assumptions beyond those given by f and the
definition of Monad. As used here it is a standard term from the
mathematical theory of adjoint functors.

Cofree comonads are dual to free monads. They provide convenient ways to talk
about branching streams and rose-trees, and can be used to annotate syntax
trees. The cofree comonad can be seen as a stream parameterized by a Functor
that controls its branching factor.

More information on free monads, including examples, can be found in the
following blog posts:
https://ekmett.github.io/reader/2008/monads-for-free/
https://ekmett.github.io/reader/2011/free-monads-for-less/
license_spdx: BSD-3-Clause
version: 0.2.2
spec_version: 1.0
download_url: http://hackage.haskell.org/package/free-0.2.2/free-0.2.2.tar.gz
home_url: 
                http://github.com/ekmett/free/
              
news_url: https://libraries.io/hackage/free/versions.atom
date: 2015-01-26
about_resource: NONE
libraries_io_url: https://libraries.io/hackage/free?number=0.2.2
vcs_tool: git
vcs_repository: https://github.com/ekmett/free
vcs_branch: master
