Skip to content

Instantly share code, notes, and snippets.

@robotlolita
Created February 25, 2011 13:36
Show Gist options
  • Save robotlolita/843782 to your computer and use it in GitHub Desktop.
Save robotlolita/843782 to your computer and use it in GitHub Desktop.
# Pair stepper generator
(defun pair_stepper: (seq) ->
(letb (slen = (len seq)) ->
(stepper seq, (idx) ->
(if idx + 1 >= slen
((list idx, $break))
else
(list idx + 1, (nth idx, seq, 2))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment