thephoeron / LLTHW

Learn Lisp The Hard Way source-code and full book text

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

1-01-02-more-detail.md Example expected a float value for output but got an integer instead.

badlirashid opened this issue · comments

Hi,

When doing the example for 1-01-02-more-detail.md on line 246, instead of getting the value of 2.0 (float) i got a value of 2 (integer).Using sbcl 1.3.15.

  • (defvar one 1.0)
    ONE

  • one
    1.0

  • (defun mad-adder (one)
    (declare (special one))
    (let ((one 1))
    (+ one (locally (declare (special one)) one))))
    MAD-ADDER

  • (mad-adder one)
    2

  • (+ one one)
    2.0