j
k
j a
j l
aditya siram 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.
Back to the thread
Back to the list