I am following the course videos of 2020 but doing the assignments in the order that's presented in the book. The book introduces WhileLoop before Tuple and Function, which I think is nice since I can use Begin for the translation of Tuple. But when I come to Functions, the above examples upsets me. How can I compile the (set! f g)? Or should I just modify the type checker to forbid assignments to top-level defined functions?
I am having trouble compiling programs like the below:
I am following the course videos of 2020 but doing the assignments in the order that's presented in the book. The book introduces WhileLoop before Tuple and Function, which I think is nice since I can use Begin for the translation of Tuple. But when I come to Functions, the above examples upsets me. How can I compile the
(set! f g)
? Or should I just modify the type checker to forbid assignments to top-level defined functions?