Suppose I have something like this:
(define pair (cons 1 (lambda (x) (* x x))
If I want to return the front object of the pair, I do this:
(car pair)
And it returns 1. However, when the object is a procedure, I do not get its exact description. In other words:
(cdr pair)
returns #<procedure>, not (lambda (x) (*x x)).
How to fix it?
source
share