On 04/02/2013 09:24 AM, WhatMeWorry wrote:>
> I don't suppose there is a digital.D.beginner forum?
>
> I've been staring at this definition for about an hour and I still can't
> decode it.
>
> int[string][double[int[]]] a;  //

alias usually makes the syntax cleaner but that is still pretty crazy. :)

void main()
{
    int[string][double[int[]]] a;

    alias Numbers = int[];
    alias NumbersToDoubleDict = double[Numbers];
    alias StringToIntDict = int[string];
    alias CrazyDict = StringToIntDict[NumbersToDoubleDict];

    CrazyDict b;

    static assert(is(typeof(a) == typeof(b)));
}

Ali

Reply via email to