Seems to me this loop could be implemented as:
```
foreach (e; range)
    unaryFun!(e);
```