week3 Flashcards
1
Q
pbr vs pbn (if expression in param)
A
pbr evaluates expression at function call, pbn evaluates expression in body (bc expression is copied into function body)
2
Q
how to implement algol copy rule
A
pass in closure
3
Q
java value of obj is =
A
address
4
Q
functional lang
A
- no notion of state
- programs are collections of function definitions and uses of function call
- func are “first class” obj - can pass as params, return as vals, include in data struct
- recursions only form of rep
- binding but no assignment statement
5
Q
tail recursion
A
recursive call is last step
6
Q
side effects
A
any change to state of system that influences dependent values