can be an element that is implicitly convertible to T, an input range of such elements, or another singly linked list
a reference to this list
Complexity: O(n + m), where m is the number of elements in rhs.
import std.algorithm.comparison : equal; auto s = SList!int(4, 5); SList!int sl; assert(sl.empty); sl ~= 1; sl ~= [2, 3]; assert(equal(sl, [1, 2, 3])); // append an input range sl ~= s; assert(equal(sl, [1, 2, 3, 4, 5])); s.front = 0; assert(equal(sl, [1, 2, 3, 4, 5]));
Append the elements of rhs at the end of the list.
If no allocator was provided when the list was created, the GCAllocator.std.experimental.allocator. will be used.