home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / lisp / mcl / 1597 < prev    next >
Encoding:
Internet Message Format  |  1992-11-16  |  1.4 KB

  1. Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!data.nas.nasa.gov!taligent!apple!cambridge.apple.com!rik@cs.UCSD.EDU
  2. From: rik@cs.UCSD.EDU (Rik Belew)
  3. Newsgroups: comp.lang.lisp.mcl
  4. Subject: Making a lambda-expr more like a fn
  5. Message-ID: <9211160703.AA22159@gremlin>
  6. Date: 16 Nov 92 07:03:06 GMT
  7. Sender: info-mcl-request@cambridge.apple.com
  8. Lines: 31
  9. Approved: comp.lang.lisp.mcl@Cambridge.Apple.C0M
  10.  
  11.  
  12. One of the changes to CL2 that bit me has been that
  13. raw lambda's can no longer be funcall'd (or apply'd)
  14. directly.
  15.  
  16. With CMULisp, I have remedied this by coercing the lambda
  17. into a function first:
  18.  
  19.         (setf (org-lexpr p) (coerce lexpr 'function))
  20.  
  21. But CCL::COERCE-TO-FUNCTION won't have it:
  22.  
  23.  
  24. > Error: value (LAMBDA (WLIST &AUX X1) (SETQ X1 (NTH 0 HISTORY)) (VALUES (+ (CAR WLIST) (* (NTH 1 WLIST) X1)) (LIST 1.0 X1))) is not of the expected type FUNCTION.
  25. > While executing: CCL::COERCE-TO-FUNCTION
  26.  
  27. I have also tried prepending the #' (function) abbrev., but
  28. that result couldn't be funcalled either.
  29.  
  30. I was able to get what I wanted compiling the form instead.  However, in
  31. this application, I would like very much to avoid the compilation overhead
  32. if at all possible.  Can I?
  33.  
  34. Richard K. Belew
  35. Computer Science & Engr. Dept. (C-014)
  36. Univ. California -- San Diego
  37. La Jolla, CA 92093
  38. rik@cs.ucsd.edu
  39. 619 / 534-2601
  40.       534-5288 (msgs)
  41.       534-7029 (fax)
  42.