2 ms·
Polymorphic functions exist in many languages: pay(invoice, anAmount), reschedule(appointment, aDate). Lisp, Scheme, Haskell, Erlang.. They all can do that. If
by bjourne 12y ago
Polymorphic functions exist in many languages: pay(invoice, anAmount), reschedule(appointment, aDate). Lisp, Scheme, Haskell, Erlang.. They all can do that. If the function can dispatch on the first parameter given, they become equivalent to the object oriented syntax. But many languages go one step further and let you dispatch on any of the arguments, or a combination of them and so on.