Skip to content

Instantly share code, notes, and snippets.

@onionhammer
Last active August 29, 2015 14:08
Show Gist options
  • Save onionhammer/8c4dd13e2f4a92ad8102 to your computer and use it in GitHub Desktop.
Save onionhammer/8c4dd13e2f4a92ad8102 to your computer and use it in GitHub Desktop.
# Dont remove any ()'s!
import sequtils, future
iterator items(num = 10): int =
for i in 1.. num:
yield i
let values = toSeq(numbers())
.filter(x => (x mod 2 == 1))
.map((x: int) => "Num " & $x)
echo values
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment