Polymorphism and higher order functions

Until now, we've played with functions that operate on only one type of data (monomorphic functions). Now, we will finally apply our type system knowledge to build functions that work for multiple types. Functions that take type parameters are called polymorphic functions similar to polymorphic methods implemented in an object-oriented hierarchy of classes (subtype polymorphism). For functions in Scala, it is called parametric polymorphism

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.21.152