Skip to content

Instantly share code, notes, and snippets.

@michelrandahl
Created March 12, 2017 02:16
  • 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?
-- Attempting to implement my own Maybe monad using the Option type naming from F#
data Option x = None
| Some x
Functor Option where
map f None = None
map f (Some x) = Some (f x)
Applicative Option where
pure = ?stuff1
(<*>) = ?stuff2
Monad Option where
(>>=) = ?stuff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment