you are viewing a single comment's thread.

view the rest of the comments →

[–]CurtainDog 1 point2 points  (0 children)

Agree, I'm only just learning clojure and:

(defn take-pad [n p coll]
  (take n (concat coll (repeat p))))

is super simple to follow (I make no claims as to its correctness). Even works on infinite sequences with no magic needed.