home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.lisp
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!tulane!lang
- From: lang@cs.tulane.edu (Raymond Lang)
- Subject: Re: Scheme equivalence in CL
- Message-ID: <1992Sep1.234712.23306@cs.tulane.edu>
- Sender: news@cs.tulane.edu
- Organization: Computer Science Dept., Tulane Univ., New Orleans, LA
- References: <gecyA4y00awM4OQVkQ@andrew.cmu.edu>
- Date: Tue, 1 Sep 1992 23:47:12 GMT
- Nntp-Posting-Host-[nntpd-23262]: okeanos
- Lines: 22
-
- In article <gecyA4y00awM4OQVkQ@andrew.cmu.edu> Stefan Monnier <sm86+@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
- lang@cs.tulane.edu
-