AliasSeq of AliasSeq, or meta-functions that take multiple lists
Jean-Louis Leroy via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Jun 19 12:54:03 PDT 2017
I need to process two sequences in parallel (select some elements
of sequence A depending of the corresponding element of sequence
B). How can I pass two sequences to a meta-function? I tried
nesting AliasSeqs but I get Perl4 style flattening:
AliasSeq!(AliasSeq!(int, float),
AliasSeq!(char, double))
-> (int,float,char,double)
I worked around the problem by passing a single AliasSeq to my
meta-function and using indexation to access the two sub-lists
but now I need to process three sequences in parallel and I am
looking for a cleaner solution.
More information about the Digitalmars-d-learn
mailing list