Advertisement
Guest User

Untitled

a guest
Feb 1st, 2018
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.33 KB | None | 0 0
  1.                     (
  2. defun fibonacci     (
  3.         n
  4.       &optional     (
  5.         a 0         )(
  6.         b 1         )(
  7.         acc         ()))(
  8.   if                (
  9.     zerop n         )(
  10.     nreverse acc    )(
  11.     fibonacci       (
  12.       1- n          )
  13.       b             (
  14.       + a b         )(
  15.       cons a acc    ))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement