First page Back Continue Last page Summary Graphics
Functions (2)
Parameter passing mode
- in vs out vs inout
- out was used
- to return multiple values
- let the caller allocate memory
- out deprecated by GCs and lists as first class values
Purity:
- The function must not depend nor modify a global state.
- consequence: same parameters 1 same result
- eg: printf, ++ are unpure functions
Notes: