> Who actually considers a loop a branch?
interesting question...
> A loop is a chunk of code that will be run N times depending
oh! turns out you do!
interesting question...
> A loop is a chunk of code that will be run N times depending
oh! turns out you do!
for (fn, n) = {
stop = void (i) {}
run = void (i) { fn(i); go(i + 1) }
go = void (i) { *((i < n) * &run + (i >= n) * &stop)(i) }
go(0)
}
Or you could write all the implementations for each possible n and dispatch through a registry.