I have read that before. I don't quite understand all of it in relation to how
to write an iterator and call it.
However, I went and put back the {.closure.} in my iterator and it works if I
call like this:
var stream = pricestream
for p in stream("oanda", EUR_USD):
...
Run
What I don't understand is something like this:
iterator walkDir*(dir: string; relative=false): tuple[kind: PathComponent,
path: string] {.
tags: [ReadDirEffect].} =
...
when nimvm:
for k, v in items(staticWalkDir(dir, relative)):
yield (k, v)
...
#And walkDir is called just like just like a proc and it contains no
{.closure.}
for file in walkDir(datapath / source / $instrument / "Prices"):
paths.add(file.path)
...
Run
Thanks for at least getting me working even if lack understanding.
I don't understand why the intermediate step of assigning the iterator to a
variable and then providing the variable with the parameters.
Thanks again.