This is example.lisp:
(defun f (x)
(* x 2))
(defconstant +n+ (f 1))
When I compile try to compile the file using (compile-file "example.lisp"), I get an error when compiling the constant: The function COMMON-LISP-USER::F is undefined. How can this be? I have already defined the function f before using it to define the constant. How do I define a constant whose value is the return value of a function?
I am using SBCL 2.0.1.