Juan-Carlos Gandhi (
juan_gandhi) wrote2010-01-29 08:30 pm
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
how to say in Haskell...
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
Это самое takeNth может ещё где-то потребоваться.