I have on one occasion found it useful to assign properties to functions before passing them as arguments to other functions.
That looked like this (sorry about any confu
functional composition is the right tract... here is a function for adding a prop to a different function.
var addProp = function(fun, propName, propVal){fun[propName] = propVal; return fun}
var funcOne = addProp(function(arg1,arg2){ return arg1 + arg2; }, "process",true);
var funcTwo = addProp(function(arg1,arg2){ return arg1 + arg2; }, "process",false);
the resulting code looks like that. and behaves as expected