Advertisement
Guest User

(take-nth 2 '("bl" "k" "y" "du"))

a guest
Feb 3rd, 2011
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.24 KB | None | 0 0
  1. (loop [x false
  2.        list '("bl" "k" "y" "du")
  3.        ans '()]
  4.   (if (empty? list)
  5.     ans
  6.     (if x
  7.       (recur false
  8.         (rest list)
  9.         ans)
  10.       (recur true
  11.         (rest list)
  12.         (reverse (conj ans (first list)))))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement