> _It might be trivial with userland iterators, but they are difficult to > implement without concepts._
Maybe, I dunno. The real problem seems to be that functional programming simply doesn't work for performance. You always end up transforming the return type `T` to a `var T` parameter and lose composability along the way (`f(g(x))` is not possible anymore). I envisioned an `asFunc` macro that transforms a `proc foo(x: var string)` into a `proc foo(): string` so that at least not 2 versions of these procs have to be maintained, but this still means that you need to call the var version of `foo` for performance... The only real solution seems to be a general complex term rewriting macro that eliminates and aggressively reuses temporary strings.