How to write this in coffeescript?
f = (function(){
// something
})();
Thanks for any tips :)
If you want to "alias" the arguments passed to self-invoking function in CoffeeScript, and let's say this is what you are trying to achieve:
(function ( global, doc ) {
// your code in local scope goes here
})( window, document );
Then do (window, document) ->
won't let you do that. The way to go is with parens then:
(( global, doc ) ->
# your code here
)( window, document )