@@ -97,27 +97,8 @@ @macro test2(y) { let y = "original" in y }; print( test1("replaced?") ); print( test2("replaced?") ); -######################################## -print("----------"); - -# Macro expansion is done only at the first call. -# So by using @macro parameter, it can remember the argument -# of the first call. -def remember1( x @macro, y ) { if x == y then "yes" else "no" }; -print( remember1(1, 1) ); # yes 1 == 1 -print( remember1(2,1) ); # yes "1" == 1 -print( remember1(2,2) ); # no "1" != 2 - -# exactly the same function, but called in different order -def remember2( x @macro, y ) { if x == y then "yes" else "no" }; -print( remember2(2, 2) ); # yes "2" == 2 -print( remember2(2, 1) ); # no "2" != 1 -print( remember2(1, 1) ); # no "2" != 1 - -# Is this a good thing or a bad thing?? - ######################################## print("----------"); # Trick to extract the AST of a function