Content deleted Content added
m sp: An other→Another |
No edit summary |
||
Line 5:
Another, completely separate definition of '''generic function''' is a function that uses parametric polymorphism. This is the definition used when working with a language like [[OCaml]]. An example of a generic function is
<source lang="ocaml">
let id a = a
</source>
which takes an argument of any type and returns something of that same type.
|