Sequence abstraction
Fixme work in progress
(first '(1 2 3 4 5))
(rest '(1 2 3 4 5))
(last '(1 2 3 4 5))
(defn nth [items n]
(if (= n 0)
(first items)
(recur (rest items) (- n 1))))
(define squares '(0 1 4 9 16 25))
(nth squares 3)
当前内容版权归 practicalli 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 practicalli .