
28 Jan
2017
28 Jan
'17
9:09 a.m.
Ok so how would the implementation look to get the correct result ? I can't seem to write something that will compile except ZipList version. Thanks, Sasa
On Jan 27, 2017, at 23:21, Francesco Ariis
wrote: On Fri, Jan 27, 2017 at 11:09:07PM +0100, sasa bogicevic wrote:
What is wrong with my applicative instance for custom List type ?
[..]
You have implemented <*> on a list in one of the many possible (and sensible) ways. In regular Haskell it's a ZipList
λ> :m Control.Applicative λ> ZipList [(+1), (*2)] <*> ZipList [1,2] ZipList {getZipList = [2,4]}
(and there's nothing wrong with that) _______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners