
2 Jan
2015
2 Jan
'15
9:50 a.m.
$ ghci-7.8.4 -Wall Prelude> zipWith (==) "" undefined [] $ ghci-7.10.0.20141227 -Wall Prelude> zipWith (==) "" undefined *** Exception: Prelude.undefined I found the difference because my mapAdjacent function uses 'tail' in the second argument of 'zipWith': mapAdjacent :: (a -> a -> b) -> [a] -> [b] mapAdjacent f xs = zipWith f xs (tail xs) I get: $ ghci-7.10.0.20141227 -Wall *Prelude> Data.List.HT.mapAdjacent (==) ([] :: [Int]) *** Exception: Prelude.tail: empty list