AP
Size: a a a
AP
A
AP
A
AP
AP
A
AP
AP
к
A
newtype Actions a = Actions{runActions::World -> [(a,World)]}
instance Monad Actions where
(Actions xs) >>= k = Actions $ nubBy (sameWorld `on` snd) . runWorld
where runWorld w = do
(x, w') <- xs w
runActions (k x) w'
AP
(a >>= b) >>= c
== a >>= (b >>= c
)AP
A
AP
AP
A
AP
к
A