t7109.nim 137 B

123456789
  1. iterator iter*(): int {.closure.} =
  2. yield 3
  3. var x = iter
  4. doAssert x() == 3
  5. let fIt = iterator(): int = yield 70
  6. doAssert fIt() == 70