View on GitHub

301-reading-notes

FUNCTIONAL PROGRAMMING

Functional programming is a programming paradigm style of building the structure and elements of computer programs that treats computation as the evaluation of mathematical function and avoids changing-state and mutable data. (Taken from Wkipedia).

PURE FUNCTION

IMPURE FUNCTION

IMMUTABILITY

Its a data that is unable to be changed instead you create a new one.

PURE FUNCTION + IMMUTABLE DATA = REFERENTIAL TRANSPARENCY

HIGHER ORDER FUNCTION

Is a method given a collection that filters using an attribute and expectes a true or a false value to determine if the element should or should not be included in the result.

MAP

Is a method that transforms a collection by applying a function to all its elements and returns a new collection of returned values.