1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 06:11:49 +03:00

Reformat mlfp’s signature.

This commit is contained in:
Rob Rix 2017-12-21 14:46:21 -05:00
parent 0aece7bea0
commit db040aea62

View File

@ -136,7 +136,12 @@ fixCache ev' yield e = do
-- Repeatedly runs a monadic action starting from some initial seed and coinductively recurring until the actions results converge.
--
-- cf https://en.wikipedia.org/wiki/Kleene_fixed-point_theorem
mlfp :: (Eq a, Monad m) => a -> (a -> m a) -> m a
mlfp :: ( Eq a
, Monad m
)
=> a
-> (a -> m a)
-> m a
mlfp a f = loop a
where loop x = do
x' <- f x