documentcloud/underscore — pull request #1062 by mcordingley (2013-04-09 19:40:07+00:00)
Title: _.flip()

Adding the _.flip() function to return a function that applies its arguments in reverse.

This idea and justification for this function is per this comment: https://github.com/documentcloud/underscore/pull/474#issuecomment-16132870

In addition to the requirements laid out in the comment, this function also preserves the value of `this` from the calling context, so it will not interfere with `bind`, etc.

An appropriate test has been added to the functions.js test file.