How long until we can do this?
/* coffee
multiply = (x,y,next) -> next(null,x*y)
*/
multiply(2,5,function(err,result){
if(err) throw err;
alert(result); // 10
});
Actually, turns out with DocPad and the DocPad Text Plugin you can:
<t render="js.coffee">
multiply = (x,y,next) -> next(null,x*y)
</t>
multiply(2,5,function(err,result){
if(err) throw err;
alert(result); // 10
});