clj-commons / clj-commons/ordered

Consider adding `ordered-map?` & `ordered-set?`

Open
#102 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Clojure
Stars
267
Forks
40
Avg merge
14h 2m
Merged PRs (30d)
17

Description

While looking at what parts of `ordered` folks are using in #98, I noticed that some are referring directly to `ordered` types to test whether they are dealing with an ordered map or set.

Just like Clojure now offers handy type checkers like `string?`, we could provide:

- `ordered-map?` returns true if `OrderedMap` or `TransientOrderedMap`
- `ordered-set?` returns true if `OrderedSet` or `TransientOrderedSet`

Good idea? Lemme know, and I'll make it so.

Contributor guide

No contributing guide indexed for this repository

Research direction

Read the existing definitions for OrderedMap, TransientOrderedMap, OrderedSet, and TransientOrderedSet, along with the type-checking conventions used by helpers such as Clojure's string?. The proposed behavior is to provide ordered-map? and ordered-set? predicates covering the corresponding persistent and transient types; confirm the project wants this API before implementing, then test both predicates against all four types.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
backend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
57/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.