I know how to write a callback function with coffee-script,like this:
test1.coffee
exports.cube=(callback)->
callback(5)
test2.coffee
test1=require('./test1')
test1.cube (result) ->
console.log(result)
I want to know how to add a parameter into callback function? so that I can use it like this:
test1.cube(para,result)->
//use *para* to compute a *result*
//here can do something with *result*