"This book should not have been published in its current form. It contains many instances of incorrect and inconsistent terminology, as well as many other errors."[1]
~$ sbcl
This is SBCL 1.4.11, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* (defun fibonacci-tail-recursive ( n &optional (a 1) (b 1))
(declare (optimize (speed 3) (safety 0) (debug 0))
(type fixnum n a b))
(if (< n 1)
a
(fibonacci-tail-recursive (- n 1) b (+ a b))))
FIBONACCI-TAIL-RECURSIVE
* (time (fibonacci-tail-recursive 46))
Evaluation took:
0.000 seconds of real time
0.000001 seconds of total run time (0.000001 user, 0.000000 system)
100.00% CPU
2,513 processor cycles
0 bytes consed
2971215073
*
More than 20 years of experience in multiple technologies.
Portafolio: https://www.rufina.link/portafolio/