Why not just replace this loop  with:
```D
haystack = find!pred(haystack, needle);
```
?