[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Making a lambda-expr more like a fn

One of the changes to CL2 that bit me has been that
raw lambda's can no longer be funcall'd (or apply'd)

With CMULisp, I have remedied this by coercing the lambda
into a function first:

        (setf (org-lexpr p) (coerce lexpr 'function))

But CCL::COERCE-TO-FUNCTION won't have it:

> 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.
> While executing: CCL::COERCE-TO-FUNCTION

I have also tried prepending the #' (function) abbrev., but
that result couldn't be funcalled either.

I was able to get what I wanted compiling the form instead.  However, in
this application, I would like very much to avoid the compilation overhead
if at all possible.  Can I?

Richard K. Belew
Computer Science & Engr. Dept. (C-014)
Univ. California -- San Diego
La Jolla, CA 92093
619 / 534-2601
      534-5288 (msgs)
      534-7029 (fax)