2 Sort integers from the command line in a very ridiculous way: leveraging timeouts :P
5 system = require 'system'
7 if system.args.length < 2
8 console.log "Usage: phantomjs sleepsort.coffee PUT YOUR INTEGERS HERE SEPARATED BY SPACES"
12 args = Array.prototype.slice.call(system.args, 1)
14 setTimeout (do (int) ->
18 phantom.exit() if sortedCount is args.length),