Is there any way to compare equality of functions in LISP?
The following example explains what do I mean:
Let us define two functions:
>>>>> (defun next1 (x) (+ x 1) )
and
>>>>> (defun next2 (y) (+ y 1) )
Clearly, they do the same as functions and their formal definitions differ only by the name of
formal variable.
My question: is there a possibility in LISP to recognize that these functions are identical?
A simple test call (equalp next1 next2) results NIL...
The following example explains what do I mean:
Let us define two functions:
>>>>> (defun next1 (x) (+ x 1) )
and
>>>>> (defun next2 (y) (+ y 1) )
Clearly, they do the same as functions and their formal definitions differ only by the name of
formal variable.
My question: is there a possibility in LISP to recognize that these functions are identical?
A simple test call (equalp next1 next2) results NIL...
To understand LISP, you must first understand LISP.