Last active
April 3, 2020 12:38
-
-
Save inv2004/0a71607514cb278bcd64543c225e1166 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncdispatch, json | |
proc f(): Future[seq[JsonNode]] {.async.} = | |
let fullJson = %*{"list": [{"c":1}, {"c":2}]} | |
for json in fullJson["list"]: | |
result.add(json) | |
when isMainModule: | |
let cs = waitFor f() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment