Jump to content

Pascal's triangle/Puzzle: Difference between revisions

minor correction to Clojure version
(revised Clojure version)
(minor correction to Clojure version)
Line 240:
If you want to solve the whole pyramid, just add a call ''(show-pyramid x z)'' to the previous ''let'' form:
<lang lisp>
(defn dot [v1 v2] (reduce + (map * v1 v2)))
 
(defn show-pyramid [x z]
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.