Skip to content

Instantly share code, notes, and snippets.

@fjolnir
Created December 18, 2013 08:17
Show Gist options
  • Save fjolnir/8018934 to your computer and use it in GitHub Desktop.
Save fjolnir/8018934 to your computer and use it in GitHub Desktop.
import "stdlib"
import "unistd"
delay = 1
x = 10
blocks = [
`x += 1`,
`x -= 1`,
`x *= 2`,
`x /= 2`,
`x *= x`
]
pickFun = `blocks[Arc4random_uniform(blocks count-1)]`
funs = []
10 times: {
funs push: (async pickFun())
}
funs each: { fun |
fun waitTillFulfilled call
x print
Sleep(1)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment