Norbert Nemec Wrote:

> Hi everybody,
> 
> thinking about array expressions, I have stumbled over an interesting 
> challenge for which I still have no idea:
> 
> Consider the mathematical sum notation:
> 
>       \sum_i a_i*b_i
> 
> here, the variable i is defined only at the scope inside the expression.
> 
> A analogous D syntax could be something like
> 
>       sum!(i)(a[i]*b[i])

Would sum!( "i", "a[i]*b[i]" ) be acceptable? That should be achievable with a 
template mixin that does string mixins under the hood.

Reply via email to