尾递归版
(def f (fn fb
[n a1 a2]
(if (< n 2)
a1
(fb (- n 1) a2 (+ a1 a2) )
)
))
(map #(f % 1 1) [1 2 3 4 5 6 7])
转载于:https://www.cnblogs.com/or2-/p/3608710.html
尾递归版
(def f (fn fb
[n a1 a2]
(if (< n 2)
a1
(fb (- n 1) a2 (+ a1 a2) )
)
))
(map #(f % 1 1) [1 2 3 4 5 6 7])
转载于:https://www.cnblogs.com/or2-/p/3608710.html