.byKeyValue should probably return a Tuple
H. S. Teoh via Digitalmars-d
digitalmars-d at puremagic.com
Fri Feb 17 09:40:02 PST 2017
On Thu, Feb 16, 2017 at 08:43:57AM +0000, Seb via Digitalmars-d wrote:
> On Thursday, 16 February 2017 at 05:20:32 UTC, H. S. Teoh wrote:
> > On Thu, Feb 16, 2017 at 05:02:41AM +0000, Yuxuan Shui via Digitalmars-d
> > wrote:
> > > On Wednesday, 15 February 2017 at 22:02:01 UTC, Seb wrote:
[...]
> > > > There's byPair (http://dlang.org/phobos/std_array.html#byPair)
> > > > that as a library does exactly the following:
> > > > ```
> > > > a.byKeyValue.map!(pair => tuple(pair.key, pair.value))
> > > > ```
> > >
> > > Thanks!
> > >
> > > It should be more visible though. Can we include it here:
> > > https://dlang.org/spec/hash-map.html ?
> >
> > Please file a bug against dlang.org to request this doc update, so that
> > people won't forget to do it. Thanks!
> >
> >
> > T
>
> Or just do it yourself - it's not that difficult:
>
> https://github.com/dlang/dlang.org/edit/master/spec/hash-map.dd
Well, I didn't have time to fix it then, and I almost forgot about it.
But luckily I kept this thread alive in my mail reader, so here it is:
https://github.com/dlang/dlang.org/pull/1573
T
--
People say I'm indecisive, but I'm not sure about that. -- YHL, CONLANG
More information about the Digitalmars-d
mailing list