[Issue 5489] std.typecons tuples dynamically iterable

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Dec 4 23:02:31 UTC 2017


https://issues.dlang.org/show_bug.cgi?id=5489

Neia Neutuladh <dhasenan at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dhasenan at gmail.com

--- Comment #1 from Neia Neutuladh <dhasenan at gmail.com> ---
I just came across an instance of this:

        cartesianProduct(
                ["%a, ", "%A, ", ""],
                ["%d "],
                ["%b", "%B"],
                [" %Y %H:%M:%S "],
                ["%Z", "%z", "%.%.%.", "%.%.", "%."]
                )
        .map!(x => joiner(x, "").array.to!string)
        .array

I ended up using [x.tupleof], but it didn't occur to me that that was possible.
I only found out about that by looking at this issue.

--


More information about the Digitalmars-d-bugs mailing list