[Issue 4492] Version of take() which takes from the back of a range

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jul 22 15:07:07 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4492


Andrei Alexandrescu <andrei at metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrei at metalanguage.com


--- Comment #9 from Andrei Alexandrescu <andrei at metalanguage.com> 2010-07-22 15:07:02 PDT ---
It looks like we're already in good shape to meet such a need. If popping
elements from the tail is needed, take(retro(range), n) should do. If getting
the last n elements from a range in the same order is needed,
range[range.length - n .. range.length] should do. I'll keep this open for a
bit more if something new shows up.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list