Back to marketplace

12 - Fundamentals of Functional Programming

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

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

Card preview (7)

#1
Front (Question)

Explain the purpose of the fold function in a functional programming language.

Back (Answer)

It reduces a list of values to a single value by applying a combining function.

#2
Front (Question)

Explain what a higher-order function is.

Back (Answer)

A function that takes a function as an argument or returns a function as a result.

#3
Front (Question)

What is map?

Back (Answer)

A higher-order function that applies a given function to each element of a list, returning a list of results. eg. map (*2) [1,2,3] outputs [2,4,6]

#4
Front (Question)

What is filter?

Back (Answer)

A higher-order function that processes a data structure, typically a list, in some order to produce a new data structure containing exactly those elements of the original data structure that match a given condition. eg. filter (<5) [1,4,6] outputs [1,4]

#5
Front (Question)

What is fold?

Back (Answer)

A higher-order function which reduces a list of values to a single value by repeatedly applying a combining function to the list of values.

#6
Front (Question)

What is the head of a list?

Back (Answer)

The first element in the list eg the head of [1,2,3] is 1

#7
Front (Question)

What is the tail of a list?

Back (Answer)

A list containing each element other than the first element of the list eg the tail of [1,2,3] is [2,3]