I am extremely new to lisp, had previous experience with functional programming (Haskell, SML). Why is this code returning 14
, and not 10
(i.e. 1 + 2y + 3 + 1
)?
(defvar x 1)
(defun g (z)
(+ x z))
(defun f (y)
(+ (g 1)
(let ((x (+ y 3)))
(g (+ y x)))))
(f 2)