DIP32: Uniform tuple syntax

bearophile bearophileHUGS at lycos.com
Fri Mar 29 08:05:21 PDT 2013


Once tuples have a built-in syntax it becomes possible to add 
pairs/byPair to associative arrays:


auto aa = [1:2, 3:4];
{int, int}[] myPairs1 = aa.pairs;
foreach ({k, v}; myPairs1) {}
auto myPairs2 = aa.byPair;
foreach ({k, v}; myPairs2) {}

Bye,
bearophile


More information about the Digitalmars-d mailing list