Fun with scope of variables

Let's say we are given:

a0,b0,main[] ,,((c0,d0,b1),f,[(a1,c1),f]).

We can see from the index which variables have the same name but under a different block. Bear in mind that all variables here are new instances. So we can omit variables with previous index:

main[] (b1,f,[(a1,c1),f]).

In this way we can follow the output of a0,a1,b0,b1,c0,c1 and study the scope behaviour.

By comparison, we could be given a0,b0,main[] ,,((c0,d0,b1),f,[(a1,c0),f]) and main[] (b1,f,[a1,f]).

References

Hosted by www.Geocities.ws

1