Note
Functional Programming
- Pure functions
- Immutable data
- No/Less side effects
- Declerative
- Easier to verify
Declarative Vs Imperative Programming
Lazy Vs Strict Evaluation
Functions
name arg1 arg2 arg3 ... = expr
- Statement vs expressions
- No return statement last expression is returned
- bindings with
let
and where
- Infix Functions
- If-then-else can be in functions and are expressions
- Function application
Types