Skip to content

Commit 0b4e0b7

Browse files
committed
Merge branch 'topic/applicative-instance'
2 parents 09a8f0e + fc255e5 commit 0b4e0b7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Control/Monad/Free.purs.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ instance functorFree :: (Functor f) => Functor (Free f) where
1313
go (Pure a) = Pure (f a)
1414
go (Free fa) = Free (go <$> fa)
1515

16+
instance applicativeFree :: (Functor f) => Applicative (Free f) where
17+
pure = return
18+
(<*>) = ap
19+
1620
instance monadFree :: (Functor f) => Monad (Free f) where
1721
return = Pure
1822
(>>=) (Pure a) f = f a

0 commit comments

Comments
 (0)