linearScanEnd pragma; string case statement optimization
This commit is contained in:
parent
6850fb73c1
commit
8d734244b1
26 changed files with 537 additions and 252 deletions
12
tests/accept/run/ttoseq.nim
Normal file
12
tests/accept/run/ttoseq.nim
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
discard """
|
||||
output: "23456"
|
||||
"""
|
||||
|
||||
template toSeq*(iter: expr): expr =
|
||||
var result: seq[type(iter)] = @[]
|
||||
for x in iter: add(result, x)
|
||||
result
|
||||
|
||||
for x, y in items(toSeq(countup(2, 6))).withIndex:
|
||||
stdout.write(x)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue