# Computing - Functional Programming

> Source: https://ollybritton.com/notes/a-level/computing/topics/functional-programming/ · Updated: 2021-03-11 · Tags: computing, school

## See Also
- [Computing - Big Data](https://ollybritton.com/notes/a-level/computing/topics/big-data/)

## Flashcards
##### What is the domain of a function??
The set from which you can choose inputs.

##### What is the co-domain of a function??
The set from which outputs come from.

##### How can you conceptualise a function as a mapping??
A function maps the domain to the co-domain.

##### If the variables in a program are immutable, what can you say about the program??
It is stateless.

##### What is referential transparency??
Where you can replace the value of a function call with the value returned.

##### What is a higher-order function??
A function that takes a function as an argument or returns a function.

##### What is a predicate function??
A function that returns only true or false.

##### What is the function called that a higher-order filter calls in order to decide if something is allowed in the list??
A predicate.

##### What does a fold function do??
Recursively combine elements of the list.

##### What does `head [1,2,3]` return??
```
1
```

##### What does `tail [1,2,3]` RETURN??
```
[2,3]
```

---
Olly Britton — https://ollybritton.com. Machine-readable index: https://ollybritton.com/llms.txt
