Skip to content

Instantly share code, notes, and snippets.

@christiantakle
Created March 31, 2014 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christiantakle/9895033 to your computer and use it in GitHub Desktop.
Save christiantakle/9895033 to your computer and use it in GitHub Desktop.
//+ thunkify :: (... -> IO ()) -> ... -> ... -> IO ()
//+ thunkify :: (... -> IO ()) -> ... -> ... -> IO ()
function thunkify(fn /*, ... */) {
args = [].slice.call(arguments, 1);
return function(/* ... */) {
fn.apply(this, args.concat([].slice.call(arguments, 0)));
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment