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

📝 the components to mlfp.

This commit is contained in:
Rob Rix 2017-12-21 14:53:39 -05:00
parent 93a47730ea
commit 3331746591

View File

@ -139,9 +139,9 @@ fixCache ev' yield e = do
mlfp :: ( Eq a
, Monad m
)
=> (a -> m a)
-> a
-> m a
=> (a -> m a) -- ^ A monadic action to perform at each iteration, starting from the result of the previous iteration or from the seed value for the first iteration.
-> a -- ^ An initial seed value to iterate from.
-> m a -- ^ A computation producing the least fixed point (the first value at which the actions converge).
mlfp f = loop
where loop x = do
x' <- f x