On 09/24/2013 01:48 PM, Gary Willoughby wrote:> I'm using
std.range.recurrence to generate a range but i want to stop it
> generating and grab the range when a particular value is added. e.g.:
>
> recurrence!("a[n-1] + a[n-2]")(1, 2)
> .take(10)
> .writeln;
>
> This writes ten numbers to the command line which is fair enough but
> what would be the preferred method to keep building the range until
You said it: until. ;)
http://dlang.org/phobos/std_algorithm.html#until
> an
> element calculated is above a particular value.
Ali