If you use Dojo you just call dojo.hitch() that does almost exactly what you want. Almost — because it can be used to pack the context as well. But your example is first:
dojo.hitch(out, "hello")("world");
dojo.hitch(out, "hello", "world")();
As well as:
var A = {
sep: ", ",
out: function(a, b){ console.log(a + this.sep + b); }
};
// using functions in context
dojo.hitch(A, A.out, "hello")("world");
dojo.hitch(A, A.out, "hello", "world")();
// using names in context
dojo.hitch(A, "out", "hello")("world");
dojo.hitch(A, "out", "hello", "world")();
dojo.hitch() is the part of the Dojo Base, so as soon as you included dojo.js it is there for you.
Another general facility is available in dojox.lang.functional.curry module (documented in Functional fun in JavaScript with Dojo — just look on this page for "curry"). Specifically you may want to look at curry(), and partial().
curry() accumulates arguments (like in your example) but with one difference: as soon as the arity is satisfied it calls the function returning the value. Implementing your example:
df.curry(out)("hello")("world");
df.curry(out)("hello", "world");
Notice that the last line doesn't have "()" at the end — it is called automatically.
partial() allows to replace arguments at random:
df.partial(out, df.arg, "world")("hello");