chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] apply - call of non-procedure


From: Will M Farr
Subject: Re: [Chicken-users] apply - call of non-procedure
Date: Wed, 20 Sep 2006 18:21:23 -0400

Try (apply car (list (list 1 2 3))). (apply 'car (list (list 1 2 3))) tries to apply the symbol car, which is indeed not a function. Unlike common lisp, where the call would be (apply #'car (list (list 1 2 3))), scheme makes no distinction between the symbol-value and the symbol-function, so operators like #' to extract the symbol- function are not needed. (If you want to know more about this, the technical term for scheme is a lisp-1; common lisp is a lisp-2---a search on google should quickly turn up *lots* of discussion of these facts.)

Will

On Sep 20, 2006, at 5:50 PM, Peter Schuller wrote:

Hello,

With csi:

#;1> car
#<procedure (f_3402 x127)>
#;2> (apply 'car (list (list 1 2 3)))
Error: (apply) call of non-procedure: car

I feel stupid asking about what seems like a trivial function, but I just
don't see what I am missing.

--
/ Peter Schuller, InfiDyne Technologies HB

PGP userID: 0xE9758B7D or 'Peter Schuller <address@hidden>'
Key retrieval: Send an E-Mail to address@hidden
E-Mail: address@hidden Web: http://www.scode.org



_______________________________________________
Chicken-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/chicken-users





reply via email to

[Prev in Thread] Current Thread [Next in Thread]