LinkedList.byElement

Undocumented in source. Be warned that the author may not have intended to support it.
struct LinkedList(T, bool ordered = true)
byElement
()

Examples

LinkedList!int list;
scope(exit) list.free();

assert(list.byElement().empty);

list.insertBack(1);
list.insertBack(2);
list.insertBack(3);

auto range = list.byElement();
import std.range : isInputRange;
import std.algorithm : equal;
static assert(isInputRange!(typeof(range)));

assert(equal(range, [1,2,3]));

range = list.byElement();
auto saved = range.save();
range.popFront();
assert(equal(range,[2,3]));
assert(equal(saved,[1,2,3]));

Meta