CPS als Monade

feed :: CPS a -> ( a -> Action Val ) 
     -> Action Val
feed ( CPS s ) c = s c

feed ( s >>= f ) c = 
    feed s ( \ x -> feed ( f x ) c )

feed ( return x ) c = c x

lift :: Action a -> CPS a



Johannes Waldmann 2013-01-31