ch-ch-update: series, closed-form series, and strides

Jarrett Billingsley jarrett.billingsley at gmail.com
Sat Jan 31 06:40:02 PST 2009


On Sat, Jan 31, 2009 at 9:34 AM, Ary Borenszweig <ary at esperanto.org.ar> wrote:
> auto fib = series!((Range a, int n) { a[n-1] + a[n] })(1, 1);
>
> And if you could just ommit the types in the delegate...
>
> auto fib = series!((a, n) { a[n-1] + a[n] })(1, 1);

Or just steal things from other languages.

auto fib = series!(\a, n -> a[n - 1] + a[n])(1, 1);

Haskell function literals, wee!  Of course, it means actually using \
for something useful, unlike how it's used now.



More information about the Digitalmars-d mailing list