You can define an opApply in a template and use it like this:
mytemplate!(int).opApply(int delegate(int v) {
...loop...
return 0;
});
Which is what I had to do since D won't let you do this:
foreach(v; mytemplate!(int))
{
...loop...
}
The second one looks much nicer, and they both mean the same thing. So
why do we have to use the first?
-Rob