Fibonacci with ranges

Jesse Phillips jessekphillips+D at gmail.com
Fri Mar 11 15:46:15 PST 2011


Without testing: foreach (f; take(recurrence!("a[n-1] + a[n-2]")(0UL, 1UL), 50))

teo Wrote:

> Just curious: How can I get ulong here?
> 
> foreach (f; take(recurrence!("a[n-1] + a[n-2]")(0, 1), 50))
> {
> 	writeln(f);
> }




More information about the Digitalmars-d-learn mailing list