LinkedList!int list; scope(exit) list.free(); auto element = list.append(13); assert(element.datum == 13); assert(list.length == 1); element = list.append(42); assert(element.datum == 42); assert(list.length == 2);
See Implementation