Polymorphic Functions
This lesson will show us how functions can adapt the principles of polymorphism.
We'll cover the following
What are Polymorphic Functions?
Polymorphic functions are functions that work with several data types.
Since Reason is a strongly-typed language, we often explicitly define the type of our values.
Applying this rule to function parameters, we would end up with the same function being redefined again and again for different data types.
Here is an example:
Get hands-on with 1400+ tech skills courses.