Assignment 12 Task 2

Moderator: Konzepte der Programmiersprachen

Beiträge: 8
Registriert: 22. Jun 2016 14:14

Assignment 12 Task 2

Beitrag von tdchnk »

Hi everyone,

test 18 expects an exception for the following function:

Code: Alles auswählen

typeOf(Let('x, NewBox(42), Seqn(SetBox('x, Fun('y, TNum(), 'y)), OpenBox('x))))
Can someone please explain to me why that piece of code should yield an exception? Is it because we assign a function to a Box that previously contained a number and that makes it unsafe?

Zurück zu „Konzepte der Programmiersprachen“