aditya siram <[email protected]> writes: > byTwos :: [a] -> [(a,a)] > byTwos [] = [] > byTwos (x:[]) = [] > byTwos (x:y:xs) = (x,y) : byTwos (y:xs)
byTwos l = zip l (tail l) -- Cheers, Feri. _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
