Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 686 Bytes

File metadata and controls

19 lines (14 loc) · 686 Bytes

Functional Programs

Show experience of constructing simple programs in a functional programming language.

Higher order functions

A function is higher-order if it takes a function as an argument or returns a function as a result, or does both.

Examples of higher order functions

Function Use Example
map Applying a function to every element in a list map (+2) [1..10] - adds two to every element
filter Filtering a list based on a provided function filter (<5) [1..10] - returns elements less than 5
reduce / fold Reduces a list of values to a single value by applying a combining function to the list