repositories
/
fp1415.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
rare shit
[fp1415.git]
/
fp2
/
week2
/
mart
/
oldold
/
old
/
StdMaybeMonad.icl
1
implementation module StdMaybeMonad
2
3
import StdMonad
4
5
:: Maybe a = Nothing | Just a
6
7
instance return Maybe where return x = Just x
8
instance >>= Maybe where >>= (Just x) f = f x
9
>>= Nothing f = Nothing
10
instance fail Maybe where fail = Nothing