home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / lisp / 2358 < prev    next >
Encoding:
Text File  |  1992-09-01  |  1.3 KB  |  48 lines

  1. Organization: Junior, Math/Computer Science, Carnegie Mellon, Pittsburgh, PA
  2. Path: sparky!uunet!cis.ohio-state.edu!news.sei.cmu.edu!fs7.ece.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!sm86+
  3. Newsgroups: comp.lang.lisp
  4. Message-ID: <gecyA4y00awM4OQVkQ@andrew.cmu.edu>
  5. Date: Tue,  1 Sep 1992 17:39:16 -0400 
  6. From: Stefan Monnier <sm86+@andrew.cmu.edu>
  7. Subject: Scheme equivalence in CL
  8. Lines: 38
  9.  
  10.  
  11. I used to use (great!) Scheme, but I have (cause of the teacher)
  12. to use CL this time.
  13.  
  14. So here are some questions after a bit of trying:
  15.  
  16. How are exactly used functions ?  It seems it is not as simple
  17. as in scheme.
  18. In particular, I need a function which does exacly the same
  19. as equal (but under another name)
  20.  
  21. In scheme I just would do: 
  22.     (define state-equal equal)
  23.  
  24. But in common-lisp, the best I found was:
  25.     (defun state-equal #'equal)
  26.  
  27. When I call it, CL has no problems: it is recognized as a function,
  28. it needs 2 parameters, BUT it ALWAYS returns NIL !!
  29.  
  30. I know I can redefine it more completely:
  31.     (defun state-equal (x y) (equal x y))
  32.  
  33. But the scheme way is so much nicer that I'm sure there is an
  34. equivalent way in CL.
  35.  
  36.  
  37.     Stefan Monnier
  38.  
  39.  
  40. -----------------------------------------------------
  41. -- On the average, people seem to be acting normal --
  42. -----------------------------------------------------
  43.  
  44.  
  45.  
  46.  
  47.  
  48.