On Sat, Jan 31, 2009 at 9:34 AM, Ary Borenszweig <[email protected]> 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.
