We're updating the issue view to help you get more done. 

Add map-entry? predicate

Description

Due to changes in 1.8 with making vector implement IMapEntry for 2-element vectors, checking whether something is a map entry has become a bit trickier. This enhancement proposes a new function `map-entry?` to encapsulate that check and any future updates to it.

The check for map-entry? will return true if the instance implements java.util.Map$Entry and if it is also a vector, if it's size is exactly 2.

Patch: clj-1831.patch

Screened by Joe Smith.

Environment

None

Status

Assignee

Unassigned

Reporter

Alex Miller

Labels

None

Approval

Ok

Patch

Code and Test

Fix versions

Affects versions

Release 1.8

Priority

Major