add enumerate macro (#15297)
* add `enumerate` macro * address the comments * put `enumerate` in its own module
This commit is contained in:
parent
ab05e141c0
commit
11c377c114
3 changed files with 63 additions and 5 deletions
|
|
@ -335,6 +335,7 @@ macro collect*(init, body: untyped): untyped {.since: (1, 1).} =
|
|||
call.add init[i]
|
||||
result = newTree(nnkStmtListExpr, newVarStmt(res, call), resBody, res)
|
||||
|
||||
|
||||
when isMainModule:
|
||||
since (1, 1):
|
||||
block dup_with_field:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue