I am curious about where getZipList is defined in ghc. Control.Applicative has this definition for ZipList.
newtype ZipList a = ZipList { getZipList :: [a] }
One way to use ZipLists is (from LYAH):
ghci> getZipList $ (+) <$> ZipList [1,2,3] <*> ZipList [100,100,100]
[101,102,103]
I am curious how getZipList knows what to return. Perhaps I am missing something about the newtype keyword. Thanks!