Skip to content

Commit b365c87

Browse files
committed
Merge pull request #22 from puffnfresh/bug/inconsistent-instances
Make Apply consistent with Bind
2 parents 7eb76f9 + 16c76b7 commit b365c87

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Control/Monad/ListT.purs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,10 @@ module Control.Monad.ListT
214214
go (Just (Tuple a b)) = cons' (pure a) (defer \_ -> (go (f b)))
215215

216216
instance applyListT :: (Monad f) => Apply (ListT f) where
217-
(<*>) = zipWith g where g f x = f x
217+
(<*>) f x = do
218+
f' <- f
219+
x' <- x
220+
return (f x)
218221

219222
instance applicativeListT :: (Monad f) => Applicative (ListT f) where
220223
pure = singleton

0 commit comments

Comments
 (0)