Skip to content

Instantly share code, notes, and snippets.

@apaleslimghost
Created August 14, 2013 14:28
Show Gist options
  • Save apaleslimghost/6231571 to your computer and use it in GitHub Desktop.
Save apaleslimghost/6231571 to your computer and use it in GitHub Desktop.
# applicative derived from monad
Readable::ap = (m)->
@chain (f)->
m.map f
# functor derived from monad
Readable::map = (f)->
@chain (a)~>
Readable.of f a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment