Clojure

Add filter-indexed function

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Declined
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

In Clojure 1.2, keep-indexed and map-indexed were introduced in lieu of promoting clojure.contrib.seq/indexed.

The difference between filter and keep is that keep treats false and nil differently; only nil values are removed. This behaviour may be desired in some places, but filter is much more common. It seems that since keep-indexed exists without filter-indexed, people might pull in the nil/false distinction where that's not appropriate.

I can provide a patch for this if desired.

Activity

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: