Examples of OOP in functional programming