Hacker News new | past | comments | ask | show | jobs | submit login

Wow, that worked, thanks!!!

WEB> (declaim (optimize (debug 0) (safety 0) (speed 3)))

NIL

WEB> (defun nth-fibonacci (n &optional (a 0) (b 1))

      (if (= n 0) 

          a 

          (nth-fibonacci (- n 1) b (+ a b))))
WARNING: redefining LOBE/SRC/WEB::NTH-FIBONACCI in DEFUN NTH-FIBONACCI

WEB> (time (nth-fibonacci 9999))

Evaluation took: 0.002 seconds of real time 0.001887 seconds of total run time (0.001887 user, 0.000000 system) 100.00% CPU 5,476,446 processor cycles 4,715,760 bytes consed




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: