how to write setTimeout with params by Coffeescript
I think it’s a useful convention for callbacks to come as the last argument to a function. This is usually the case with the Node.js API, for instance. So with that in mind: delay = (ms, func) -> setTimeout func, ms delay 1000, -> something param Granted, this adds the overhead of an extra function … Read more