It might be strange to ask this now, after the thread derailed a little, BUT: Araqs solution to my question worked until now. I tried to call that template a 2nd time2 lines later, which yields to the error: ` Error: redefinition of 'iter'; previous declaration here: ...` I tried to return it as an anonymous iter like this: template toFirstClassIter*(it): untyped = return iterator(): auto {.closure.} = for x in it: yield x Run
but then I get the error `Error: no return type declared`