summary refs log blame commit diff stats
path: root/tests/accept/run/ttoseq.nim
blob: a7f6c5efd3616aa860782c291489833aa85ad1b5 (plain) (tree)
1
2
3
4
5
6
7
8
9








                                   
                                      

                 
discard """
  output: "23456"  
"""

template toSeq*(iter: expr): expr =
  var result: seq[type(iter)] = @[]
  for x in iter: add(result, x)
  result
  
for x in items(toSeq(countup(2, 6))): 
  stdout.write(x)