Polymorphic Variables
Q. What is a polymorphic variable?
A. It’s a variable that can hold values of more than one type.
In Lisp, symbols often serve as polymorphic variables:
(setq x 5)
(setq x ‘apple)
(setq x ‘(peaches and pears))
Previous slide
Next slide
Back to first slide
View graphic version