forwardDifference

Compute Forward Difference of range.

TODO Is there a difference between whether R r is immutable, const or mutable?

TODO If r contains only one element return empty range.

forwardDifference
(
R
)
(
R r
)
if (
isInputRange!R
)

Examples

import std.array: array;

auto x = [long.max, 0, 1];
auto y = x.forwardDifference;

version(print) dbg(y);

// import msgpack;
// version(print) dbg(y.pack);
// version(print) dbg(y.array.pack);

See Also

Meta