# define a construct
data Maybe a = Just a | Nothing
#define martist
martist :: Maybe String
martist = Just "Varen"
#define mtrack
mtrack :: Maybe String
mtrack = Just "TrackName"
case martist of
Nothing ->
Just art -> case mtrack of
Just track ->
# type signatures/definitions
Class Monad m where
return :: a -> m a
(>>=) :: m a -> (a -> m b) -> m b
# can use do notation in function to iterate through
# implementation
Instance Monad Maybe wehre
return a = Just a
# get called in order of statement; if Just a -- Just a statement
Just a >>= fn = fn a
Nothing >>= fn = Nothing