Created
September 1, 2011 12:54
-
-
Save bcg/1186106 to your computer and use it in GitHub Desktop.
EM Loop
This file contains hidden or 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
items = [1,2,3] | |
(looper = proc { | |
item = items.pop | |
if item | |
... | |
EM.next_tick(looper) | |
end | |
}).call |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment