On Sunday, 13 August 2017 at 09:41:39 UTC, Johan Engelen wrote:
On Sunday, 13 August 2017 at 09:08:14 UTC, Petar Kirov
[ZombineDev] wrote:
[...]
[...]
Execution of sum_subranges is already O(1), because the
calculation of the sum is delayed: the return type of the
function is not `uint`, it is `MapResult!(sum, <range>)` which
does a lazy evaluation of the sum.
- Johan
Heh, yeah you're absolutely right. I was just about to correct
myself, when I saw your reply. Don't know how I missed such an
obvious thing :D