Back to marketplace

12. Fundamentals of Functional Programming

No description yet. This curated deck is ready for daily study.

Total cards: 5•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (5)

#1
Front (Question)

What is Functional Programming?

Back (Answer)

Programs consist of Functions which map inputs to outputs. There is no state (Stateless, i.e. no Variables) and as a consequence Functions have no side-effects.

#2
Front (Question)

What is the Domain and Co-Domain of a Function?

Back (Answer)

The Domain of a Function is the Data Type(s) of the Inputs/Parameters of a Function. The Co-Domain of a Function is the Data Type of the Output of a Function. Functions map their Domain to their Co-Domain.

#3
Front (Question)

What is Functional Composition?

Back (Answer)

Functional Composition is when a Function is applied directly to the output of another Function, producing a Composite Function. For example, double(x) = 2*x add2(x) = x+2 double ∘ add2(x) = 2*(x+2)

#4
Front (Question)

What is a Higher Order Function? What do Map/Filter/Fold do?

Back (Answer)

A Higher Order Function is a Function which takes another Function as its Argument. Map applies a Function to each element of a List and returns a List of the resulting values. square x = x*x map square [1, 2, 3] = [1, 4, 9] Filter applies a Boolean Function to each element of a List and returns a List of the values for which the Function returns True. greaterThan10 x = x > 10 filter greaterThan10 [5, 10, 15, 20] = [15, 20] Fold takes an initial value along with a List and sequentially applies the Function to an accumulated value and the next element of the List combining the List into a single value. multiply x, y = x*y fold multiply 1, [1, 2, 3] = 6

#5
Front (Question)

What is Partial Function Application?

Back (Answer)

Partial Function Application is when a Function is applied to only a subset of its Parameters it returns a new Function which specialises the original. add x, y = x + y add2 = add 2 add2 10 = 12