
2 Jan
2015
2 Jan
'15
9:55 a.m.
This is a big deal. That's a very common pattern. On 02/01/15 11:50, Henning Thielemann wrote:
$ 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 _______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries