This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: a[i] = 5; i = i + 1; i = x; } i = 1; a = 7; a = 3; f (a[i]); // . .. } What are the values of i and a after function f returns if the parameter is passed by i a value copy-in-copy-out reference need 3. (10 pts) Construct a small piece of code in C-style syntax like in the previous question that behaves differently for call-by-name and call-by-need. 4. (10 pts) Explain why an implementation of a functional language such as Scheme or ML requires a garbage collector. Why does a C implementation not require a garbage collector? Which garbage collection mechanism would you choose for a functional language and why? 2...
View Full Document
- Fall '08