Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 4677612143
Fetching contributors…

Cannot retrieve contributors at this time

18 lines (15 sloc) 0.244 kB
data Option a =
Some a | None
let optionMonad = {
return: \x ->
Some x
bind: \x f -> match x
case (Some a) = f a
case None = None ()
}
console.log (do optionMonad
x <- Some 1
let y = 2
z <- Some 3
return x + y + z
)
Jump to Line
Something went wrong with that request. Please try again.