You can also do this...

: (de adder (N) (list '(x) (list '+ 'x (eval 'N))))
-> adder
: (adder 1)
-> ((x) (+ x 1))
: (adder 2)
-> ((x) (+ x 2))
: ((adder 99) 1)
-> 100

Small examples like this one are great learning devices :)

As Erik pointed out though, 'curry' is probably more general purpose and a
lot more convenient to use for complex use cases. (
http://software-lab.de/doc/refC.html#curry)


/Lindsay

Reply via email to