Task

Take a combined set of elements and apply a function to each element.




void
map(list l, void (*fp)(object))
{
    l.ucall(fp, 0);
}
 
void
out(object o)
{
    o_(o, "\n");
}
 
integer
main(void)
{
    list(0, 1, 2, 3).map(out);
 
    return 0;
}