From 16c76b75498623f823b6d899691b1bc371fb9b50 Mon Sep 17 00:00:00 2001 From: Brian McKenna Date: Fri, 8 May 2015 11:09:17 -0600 Subject: [PATCH] Make Apply consistent with Bind --- src/Control/Monad/ListT.purs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Control/Monad/ListT.purs b/src/Control/Monad/ListT.purs index f8d44bf..919c421 100644 --- a/src/Control/Monad/ListT.purs +++ b/src/Control/Monad/ListT.purs @@ -214,7 +214,10 @@ module Control.Monad.ListT go (Just (Tuple a b)) = cons' (pure a) (defer \_ -> (go (f b))) instance applyListT :: (Monad f) => Apply (ListT f) where - (<*>) = zipWith g where g f x = f x + (<*>) f x = do + f' <- f + x' <- x + return (f x) instance applicativeListT :: (Monad f) => Applicative (ListT f) where pure = singleton