Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,42 @@
text
thing(void)
{
return "delegate implementation";
}
text
operation(record delegator)
{
text s;
if (r_key(delegator, "delegate")) {
if (r_key(delegator["delegate"], "thing")) {
s = call(r_query(delegator["delegate"], "thing"));
} else {
s = "default implementation";
}
} else {
s = "default implementation";
}
return s;
}
integer
main(void)
{
record delegate, delegator;
o_text(operation(delegator));
o_byte('\n');
r_link(delegator, "delegate", delegate);
o_text(operation(delegator));
o_byte('\n');
r_put(delegate, "thing", thing);
o_text(operation(delegator));
o_byte('\n');
return 0;
}