http://d.puremagic.com/issues/show_bug.cgi?id=4348
Summary: std.container.SList append Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2010-06-19 12:52:03 PDT --- This shows how you can append to a std.container.SList: import std.container: SList; void main() { auto l = SList!int(1, 2); l.insertAfter(l[], 3); } But the standard D syntax too can be supported, despite it's O(n): import std.container: SList; void main() { auto l = SList!int(1, 2); l ~= 3; } (The member function "insertFront" might be named "prepend", that is shorter , equally readable and contains no upper case letters). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------