functions
TAIL RECURSION == LOOPS (Reuse stack space)
Last action of ft consists of calling another ft
ft vs ft * 2
@tailrec annonation ensures tail recursive
Anonymous
like javascript
Special Arg Types
CASE match
Partial Application
You can partially apply any argument in the argument list, not just the last one.
Variable Length Args
Representation
Recall Int => Int is a function that takes a Int and returns an Int
Currying
Built in language!
sum takes a function that take ans returns an int and returns a ft that takes two ints and returns an int
Generics
Last updated