Skip to content

Instantly share code, notes, and snippets.

@Yardanico
Created July 4, 2020 08:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Yardanico/68ac519419d2bd459941e1fe2f7de58e to your computer and use it in GitHub Desktop.
Save Yardanico/68ac519419d2bd459941e1fe2f7de58e to your computer and use it in GitHub Desktop.
template toSeq(): untyped =
block:
var result = newSeq[int](1)
result
proc randomSample*(iter: iterator(): int) =
discard
proc clItems(s: seq[int]): iterator(): int =
(iterator(): int =
yield 1
)
randomSample(toSeq().clItems)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment