Thread overview
[Issue 13104] std.typecons.tupleOp
Mar 31, 2018
Seb
Dec 17, 2022
Iain Buclaw
March 31, 2018
https://issues.dlang.org/show_bug.cgi?id=13104

Seb <greensunny12@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |greensunny12@gmail.com

--- Comment #1 from Seb <greensunny12@gmail.com> ---

Have a look at https://github.com/dlang/phobos/pull/6386

with this the following will work:



(tuple(1, 2) ~ tuple(3, 4)).expand.only.sum = 10
(tuple(1, 2) ~ tuple(3, 4)).expand.only.max = 4


> tupleOp2!q{a + b}(tuple(1, 1.5), tuple(2, 3.2))

So here's what we got today:

zip(tuple(1, 1.5).expand.only, tuple(2, 3.2).expand.only).map!(a => a[0] +
a[1]).writeln;

https://run.dlang.io/is/6rq9MB

What I think could be improved:

- make tuples ranges by default (no .expand.only hacks)
- allow map to take a multi-argument lambda if the size of the front's element
is statically known

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=13104

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P4

--
December 01
https://issues.dlang.org/show_bug.cgi?id=13104

--- Comment #2 from dlangBugzillaToGithub <robert.schadek@posteo.de> ---
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/phobos/issues/10072

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB

--