Choosing a function to apply
> (defun do-command (command arglist)
(let (f)
(if (equal command '(multiply that))
(setq f #'*) (setq f #'+) )
(apply f arglist)
)
)
DO-COMMAND
> (do-command '(add them) '(8 13))
21
Previous slide
Next slide
Back to first slide
View graphic version