I've been a googling fool, but I just can't seem to find it. What is it called/named when I call a function with a parameter like this:
(console.log)('test')
For context, I saw it when I started playing around with replacing the process.stdout.write for testing purposes (to make sure log is writing an error message to stdout) along the lines of: Preston Guillory's gist:
process.stdout.write = (function(write) {
return function(string, encoding, fd) {
write.apply(process.stdout, arguments)
callback(string, encoding, fd)
}
})(process.stdout.write)