Famous Higher-order Functions

We'll now dive into three of the most famous higher-order functions: map, filter, and fold. These are functions that can be defined for many data structures, including lists and trees. The basic idea of each is that:

  • map transforms elements,
  • filter eliminates elements, and
  • fold combines elements.

results matching ""

    No results matching ""