Parametric polymorphism

Parametric polymorphism in functional programming is what we showed in the previous section about generics. Generics are parametric polymorphism, and as we already saw, they allow us to define methods or data structures over any type, or a subset of a given type. Concrete types can then be specified at a later stage.

Get Scala Design Patterns - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.