Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Last active July 20, 2017 19:32
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
||| Given a mapper of type (a -> b), it transforms:
||| - a step function taking values of type `b`
||| - into one taking values of type `a`
mapping : (a -> b) -> Transducer acc s s a b
mapping fn = statelessTransducer $
\next, acc, a => next acc (fn a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment