Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Created November 16, 2017 18:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deque-blog/7ba19ef39a12e55d190d5db45d2b0735 to your computer and use it in GitHub Desktop.
Save deque-blog/7ba19ef39a12e55d190d5db45d2b0735 to your computer and use it in GitHub Desktop.
implementation Functor IOSpec where
map fn expr = Bind expr (Pure . fn)
implementation Applicative IOSpec where
pure = Pure
fExpr <*> aExpr = Bind fExpr (\f => map f aExpr)
implementation Monad IOSpec where
(>>=) = Bind
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment