I used to use (great!) Scheme, but I have (cause of the teacher)
to use CL this time.
So here are some questions after a bit of trying:
How are exactly used functions ? It seems it is not as simple
as in scheme.
In particular, I need a function which does exacly the same
as equal (but under another name)
In scheme I just would do:
(define state-equal equal)
But in common-lisp, the best I found was:
(defun state-equal #'equal)
When I call it, CL has no problems: it is recognized as a function,
it needs 2 parameters, BUT it ALWAYS returns NIL !!
I know I can redefine it more completely:
(defun state-equal (x y) (equal x y))
But the scheme way is so much nicer that I'm sure there is an
equivalent way in CL.
Stefan Monnier
-----------------------------------------------------
-- On the average, people seem to be acting normal --
-----------------------------------------------------
In article <··················@andrew.cmu.edu> Stefan Monnier <·····@andrew.cmu.edu> writes:
>In scheme I just would do:
> (define state-equal equal)
>
>But in common-lisp, the best I found was:
> (defun state-equal #'equal)
>
>When I call it, CL has no problems: it is recognized as a function,
>it needs 2 parameters, BUT it ALWAYS returns NIL !!
>
>I know I can redefine it more completely:
> (defun state-equal (x y) (equal x y))
>
>But the scheme way is so much nicer that I'm sure there is an
>equivalent way in CL.
The following will copy over a definition:
(setf (symbol-function 'state-equal) #'equal)
Ray Lang
····@cs.tulane.edu