aa literals

Ellery Newcomer ellery-newcomer at utulsa.edu
Sat Mar 13 18:23:29 PST 2010

On 03/13/2010 07:20 PM, bearophile wrote:
> Ellery Newcomer:
>> anyone know of a good (or any) syntax for an empty aa
>> impetus:
>> auto aa = reduce!(g)(emptyaa, lst);
> Sorry, I have probably not understood your question.
> Bye,
> bearophile

No, you hit it on the head. Here's the kind of thing I was after:

auto g = reduce!("a[b]=1,a")(cast(int[int]) null, [1,2,3,4]);

Works fine. The one-liner probably isn't worth it, but I think it's 
pretty funny. What does this do to Walter's arguments concerning nonnull?

More information about the Digitalmars-d-learn mailing list