juan_gandhi: (Default)
[personal profile] juan_gandhi

pairwise :: [a] →  [(a, a)]
pairwise [] = []
pairwise (x:y:rest) = (x,y) : pairwise rest

is there something that does it already? Could not figure out.

Date: 2010-01-30 03:36 pm (UTC)
From: [identity profile] nivanych.livejournal.com
Зато более универсально.
Это самое takeNth может ещё где-то потребоваться.

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

September 2025

S M T W T F S
 1 2345 6
78 9 10 111213
14 151617 181920
212223 24252627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 27th, 2025 09:29 pm
Powered by Dreamwidth Studios