
Of note, there is a sensible monad instance for zip lists which I *think*
agrees with the Applicative one, I don't know why they're not monads:
instance Monad (ZipList a) where
return = Ziplist . return
join (ZipList []) = ZipList []
join (ZipList (a:as)) = zlHead a `zlCons` join (map zlTail as)
I'll provide an alternative though, Const a is an applicative, but not a
monad.
Bob
On Fri, Oct 30, 2009 at 5:25 PM, Eugene Kirpichov
Yes. ZipList. http://en.wikibooks.org/wiki/Haskell/Applicative_Functors
2009/10/30 Yusaku Hashimoto
: Hello cafe, Do you know any data-type which is Applicative but not Monad?
Cheers, -~nwn _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Eugene Kirpichov Web IR developer, market.yandex.ru _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe