bearophile wrote:
Andrei Alexandrescu:
foreach (e; take(10, fib)) writeln(e);

I think take(fib, 10) is quite better.

I like function calls that read like a sentence. Here I'd read take(10, fib) as "take 10 from fib". The only advantage of reversing the arguments is that it might decompose well into the property syntax: fib.take(10).


Sean

Reply via email to