Created
April 21, 2012 00:32
-
-
Save hughfdjackson/2432860 to your computer and use it in GitHub Desktop.
Cute CPS
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
| var after = function(fn, cb){ | |
| return function(){ | |
| fn.apply(this, arguments) | |
| cb() | |
| } | |
| } | |
| var fn = after(function(){ /* handle callback here */ }, function(){ /* setup next here */ }) | |
| // this API sucks. :p what a fail. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment