We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 885fa4f + 4ab13a2 commit 8a66e45Copy full SHA for 8a66e45
src/Control/Monad/Free.purs.hs
@@ -28,3 +28,7 @@ instance monadFreeFree :: (Functor f) => MonadFree f (Free f) where
28
29
liftF :: forall f m a. (Functor f, Monad m, MonadFree f m) => f a -> m a
30
liftF fa = wrap $ return <$> fa
31
+
32
+iterM :: forall f m a. (Functor f, Monad m) => (f (m a) -> m a) -> Free f a -> m a
33
+iterM _ (Pure a) = return a
34
+iterM k (Free f) = k $ (iterM k) <$> f
0 commit comments