representable-tries

Tries from representations of polynomial functors


Keywords
comonads, data-structures, functors, library, monads, Propose Tags, Skip to Readme, Index, Control.Monad.Reader.Trie, Data.Functor.Representable.Trie, Data.Functor.Representable.Trie.Bool, Data.Functor.Representable.Trie.Either, Data.Functor.Representable.Trie.List, Data.Traversable.Fair, Numeric.Nat.Zeroless, representable-tries-3.0.2.tar.gz, browse, Package description, Package maintainers, EdwardKmett, edit package information
License
BSD-3-Clause
Install
cabal install representable-tries-3.0.2

Documentation

representable-tries

Hackage Build Status

This package provides a simple function memoization scheme based on the notion of representable functors.

In category theory a representable functor (more pedantically a corepresentable functor) is one such that f a is isomorphic to x -> a. We choose the name Representable here because we are talking about haskell Functor instances, and they are all covariant, so this is the more natural notion of representability for Haskell.

Given the existence of representable functors, we can choose a Traversable representable functor that has our data type as a representation, and use it to memoize functions by building a data structure that has one place to hold each answer for each possible argument.

Contact Information

Contributions and bug reports are welcome!

Please feel free to contact me through github or on the #haskell IRC channel on irc.freenode.net.

-Edward Kmett