I am just trying the simple currying example from the Little Schemer
(hopefully not too unrelated) in emacs lisp and I don't seem to be having
any luck.
(defun eq?-c (a)
(function
(lambda (x)
(eq x a))) )
(setq eq?-salad (eq?-c 'salad)) ;; doesn't seem to get applied to a
(setq y 'salad)
(funcall eq?-salad y)
I get the error:
Symbol's value as variable is void: a
Does currying work in elisp?
brian
--
Brian Lavender
http://www.brie.com/brian/
"There are two ways of constructing a software design. One way is to
make it so simple that there are obviously no deficiencies. And the other
way is to make it so complicated that there are no obvious deficiencies."
Professor C. A. R. Hoare
The 1980 Turing award lecture