Currently, when declared as a "non-template internal struct", *no* inference gets triggered, meaning all the functions in `Chunk` will basically be impure, system, and throwing.

If you instead declare it in private global namespace (as `ChunkByResult(alias attrFun, Range)`), then the struct becomes a template, and inference is triggered.

Please add a `@safe pure nothrow unittest`, and you will see (it *should* be anyways).

Also, when a struct can depend on a delegate (`attrFun`), I think you *can't* use voldemort, due to problems with said delegate failing to retrieve the correct context pointer under certain situations (or something of that order). This is why the `Result`s of `map` (amongst others), where migrated to outside the body of their function.

TL.DR: Please declare `Chunk` as a private `ChunkByResult` in global space.