alexander-yakushev/foreclojure-android

Server rejected solution

Opened this issue · 0 comments

  1. 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)))