For Chuck Allison: possible homework in D
Philippe Sigaud via Digitalmars-d
digitalmars-d at puremagic.com
Sun Jun 8 07:41:32 PDT 2014
Yes indeed, you can provide a range interface on a tree. That's a good idea!
But I suppose Chuck wants to teach his students generic notions such as
mapping or folding. Ranges are more a D-specific thing.
Also, what's interesting is that when mapping a tree, you can keep its
'shape', whereas providing a range flattens the tree into a linear
construct.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20140608/ad964992/attachment.html>
More information about the Digitalmars-d
mailing list