Advertisement
CLooker

Untitled

Dec 25th, 2017
1,808
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;(= (__ 3) '(1 1 2))
  2.  
  3. (defn fib-seq [x]
  4.   (def container (reduce conj [] (range x)))
  5.   (map-indexed
  6.     (fn [index item]
  7.       (if (<= index 1)
  8.         1
  9.         (nth container 0)));figure out what to return after index 1
  10.     container))
  11.  
  12. (fib-seq 3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement