Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 8th, 2012  |  syntax: None  |  size: 0.19 KB  |  hits: 8  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. ;; rgantt's solution to Fibonacci Sequence
  2. ;; https://4clojure.com/problem/26
  3.  
  4. (fn[l]
  5.   (map
  6.   (fn fib[n] (if (<= n 2) 1 (+ (fib (- n 1)) (fib (- n 2)))))
  7.   (map (fn[n](+ n 1)) (range l)))
  8. )