Get two elements from a sequence each time
clojure
Solution
By leveraging `for` and some destructuring you can achieve your specific example:
(for [[a b] (partition 2 [1 2 3 4])](use-a-and-b a b))
Problem
Does clojure have a powerful 'loop' like common lisp. for example: get two elements from a sequence each time Common Lisp: ``` (loop for (a b) on '(1 2 3 4) by #'cddr collect (cons a b)) ``` how to do this in Clojure?