On 16/05/2012 17:48, H. S. Teoh wrote:
On Wed, May 16, 2012 at 05:41:49PM +0100, Stewart Gordon wrote:
<snip>
Why would anybody want to read a large binary file _one byte at a
time_?
[...]

import std.range;
byte[] readNBytes(R)(R range, size_t n)
        if (isInputRange!R&&  hasSlicing!R)
{
        return R[0..n];
}

What if I want it to work on ranges that don't have slicing?

Stewart.

Reply via email to