documentcloud/underscore — Issue #402: _.constant Function
Author: OttoAllmendinger
Created: 2011-12-12 10:46:36+00:00
State: open

It would be nice to have a function like

`_.constant = function(x) { return function() { return x; }}`

I have often needed something like `_.constant(true)` or `_.constant(false)` when filtering collections with a configurable iterator.