This commit is contained in:
2024-12-07 21:07:38 +01:00
parent 2fded76a5c
commit a9676272f2
120 changed files with 15925 additions and 1 deletions

View File

@ -0,0 +1,23 @@
---
type: mixed
---
## Definition
- Pure mathematical functions
- Declarative paradigm
- Instead of writing step-by-step, we define the desired outcome
- Immutable data
- => No/Less side effects
- Programs are easier to verify
- We can mathematically prove the algorithms
## Lazy vs. Strict
- Calculations are delayed until the results are actually needed
### Example
Imagine a list of numbers, but you only need the first one that meets a condition. With lazy evaluation, the program stops processing the list as soon as it finds the result, instead of checking every number.