(deftest p14-duplicate (is (= '(a a b b c c c c d d) (duplicate '(a b c c d)))))
A straightforward solution just uses reduce to conjoin the current element twice with an accumulator.
Read more about this series.
Post a Comment
No comments:
Post a Comment