Files
uwrap/testsuite/tests/core/lambda/test.wrp
Quentin Ochem f8ec4185be Switch 'self' to 'it'
The usage of the word 'self' to refer to the current iteration became increasingly
confusing with the usual OOP counterpart, in particular because its value can change
in a single expression, independendly of the surrounding object. See previous check
in that uncovered its usage in the fold function.
2020-08-23 22:03:48 -04:00

21 lines
422 B
Plaintext

template w_Entity do
var child_name : text;
var txt : text;
end;
match Entity () do
wrap w_Entity (
child_name => defer ("NO CHILDREN FOR \e<f_name>"),
txt => f_name
);
match child (Entity ())
wrap n: w_Entity (
child_name => defer (n.child (w_Entity ()).txt),
txt => f_name
);
end;
match w_Entity ()
weave standard.out ("CHILDREN FOR \e<it.origin.f_name>: \e<child_name>\n");