
27 Jan
2017
27 Jan
'17
5:21 p.m.
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)