September 2017 Update

This commit is contained in:
Ingy döt Net 2017-09-23 10:01:46 +02:00
parent bba7bfd280
commit ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions

View file

@ -1,35 +1,21 @@
void
map(list l, void (*fp) (object))
map(list l, void (*fp)(object))
{
integer i;
i = 0;
while (i < l_length(l)) {
fp(l[i]);
i += 1;
}
l_ucall(l, fp, 0);
}
void
out(object o)
{
o_integer(o);
o_byte(10);
o_(o, "\n");
}
integer
main(void)
{
list l;
l_append(l, 0);
l_append(l, 1);
l_append(l, 2);
l_append(l, 3);
map(l, out);
map(l_effect(0, 1, 2, 3), out);
return 0;
}