Skip to content

Instantly share code, notes, and snippets.

@cky
Created October 3, 2012 06:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cky/871a0abf0aa6a020f52b to your computer and use it in GitHub Desktop.
Save cky/871a0abf0aa6a020f52b to your computer and use it in GitHub Desktop.
Solution to Stack Overflow question 12702535
(define (unzip l)
(if (null? l) '(() ())
(let ((next (unzip (cdr l))))
(list (cons (car l) (cadr next)) (car next)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment