Reusable Abstractions in CoffeeScript
github.com
github.com
ofunc =(obj = {})->
fn =(k)->@[k]
bound =(args...)=>
fn.apply(bound, args)
bound extends obj
o = ofunc [1,2,3]
> o(0)
1
> o[0] = 10
10
Not that I recommend this, for the obvious reasons.