Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 2nd, 2012  |  syntax: None  |  size: 0.22 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. ;; misterlight's solution to Duplicate a Sequence
  2. ;; https://4clojure.com/problem/32
  3.  
  4. (fn [x]
  5.   (loop [sequ x acc []]
  6.     (if (empty? sequ)
  7.       (seq acc)
  8.       (recur (rest sequ) (conj acc (first sequ) (first sequ))))  ))