August 2018
Intermediate to advanced
380 pages
10h 2m
English
In this chapter, we have seen what functions are and how they have evolved from the early days of programming to today. We have seen how functions were initially treated as abstractions of common logic. After that, in object-oriented programming, they represented the behavior of certain objects. Object-oriented programmers attempted to represent everything as an object. So it is only natural that functions started to be viewed in the context of a world that consists of objects. In this context, functions are best viewed as behaviors of these objects.
In functional programming, functions can be viewed in a different context. Now, the best way to view functions is as mathematical computations. They compute some value out of its inputs, ...