Server rejected solution
Opened this issue · 0 comments
ComedyTomedy commented
- Pascal's Triangle
I've tried inlining the function to remove defn, no improvement. Was iterate added more recently than the servers version of clojure perhaps?
(fn pascal [n] (defn nxt [prev] (into [] (concat [1] (map (partial apply +) (partition 2 1 prev)) [1]))) (nth (iterate nxt [1]) (dec n)))