Polymorphic functions
Some functions are general
- That is, they can be used on arguments of different types
- Ex: length, append, is_empty, first_of_pair
In Scheme: easy using dynamic typing
How can you do this with a static typing?
- In C, you can’t
- or you need to cheat using casts
- In ML, functions can have polymorphic types