Could someone show me how to immediately invoke a function in CoffeeScript. I'm trying to accomplish something similar to this JS object literal.
WEBAPP = {
maxHeight : function(){
/* Calc stuff n' stuff */
WEBAPP.maxHeight = /* Calculated value */
}(),
someProperty : ''
/* ... */
}
Is it possible or what are the workarounds?
Copyright Notice:Content Author:「morden.dk」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/9307303/immediately-invoked-functions-in-coffeescript