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

           Summary: A function to reverse the items of a tuple
           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 2012-03-07 11:13:30 PST ---
In some situations I'd like a function to reverse a tuple:

reversed(tuple(a,b)) == reversed(tuple(b,a))
reversed(tuple(a,b,c)) == reversed(tuple(c,b,a))
reversed(tuple(a,b,c,d)) == reversed(tuple(d,c,b,a))


Once built-in associative arrays have a byPair() method, that returns a
2-tuple, a reversed(tuple(a,b)) is useful when you need the pairs in reversed
(value-key) order.

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

Reply via email to