Coercing ranges to the same type

Matt Kline via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jul 6 14:49:16 PDT 2015


On Monday, 6 July 2015 at 21:35:53 UTC, Alex Parrill wrote:

> They aren't actually the same types

I understand the problem - I was just wondering if there was a 
standard library solution to this or if I would have to roll my 
own.

> use a class wrapper in std.range.interface [1].
>
> [1]: http://dlang.org/phobos/std_range_interfaces.html

I think I'll go with this one, since the use case would be 
similar to the '-r' flag in standard Unix utils (copy, mv, etc.) 
where the user specifies if they want to recurse through provided 
directories.


More information about the Digitalmars-d-learn mailing list