how to say in Haskell...
Jan. 29th, 2010 08:30 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
pairwise :: [a] → [(a, a)]
pairwise [] = []
pairwise (x:y:rest) = (x,y) : pairwise rest
is there something that does it already? Could not figure out.
pairwise :: [a] → [(a, a)]
pairwise [] = []
pairwise (x:y:rest) = (x,y) : pairwise rest
no subject
Date: 2010-02-01 12:12 am (UTC)