Skip to main content
gamedev.net
🔒 Locked

scheme programming: a problem with lambda

Started by LordG Oct 25, 2002 at 10:19 PM 1 replies 200+ views
Original Post
LordG
LordG
I am having great difficulty in defining a lambda procedure with lists as parameters and the body. For example, this is what I''m trying to do. (lambda (cdr list) (car expr)) where (cdr list) can represent a list of parameters such as (x y) And (car expr) can represent an expression such as (+ x y) But apparently scheme won''t recognize this and will evaluate the above code with (cdr list) and (car expr) as parameters. Can anyone help me how I would go about fixing this problem? Thanks
LordG
LordG
I got it working using the list function.

Thanks anyways.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.