Mimicing Python list of list

Dandyvica via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Oct 26 11:46:43 PDT 2015


Hi all,

I'm trying to find out a solution to implement a generic tree or 
array container whose nodes
can either be elements or a subtree (or sub-array).

Pretty much like you can do in Python:

l = [1, 2, [1, 2, 3], 4]

l is a list of (integers or list of integers).

Any idea on how to do that?

Thanks.



More information about the Digitalmars-d-learn mailing list