Skip to content

Implement collection capability predicates: associative?, counted?, indexed?, reversible?, sorted?, seqable?, ifn?, map-entry?, distinct?, not-every? #824

@andreasronge

Description

@andreasronge

Context

Part of the Clojure core candidate implementation effort (Phase 4). Collection capability predicates and logic predicates.

Functions to implement

Function Description
associative? Returns true if coll implements Associative
counted? Returns true if constant-time count
indexed? Returns true if supports indexed access
reversible? Returns true if collection reversible
sorted? Returns true if collection sorted
seqable? Returns true if implements Seqable
ifn? Returns true if invokable
map-entry? Returns true if map entry
distinct? Returns true if all args distinct
not-every? Returns true if pred false for some

Notes

  • Most are simple type/capability checks
  • distinct? and not-every? are logic predicates, not collection predicates, but similar effort
  • Some predicates may need adaptation for BEAM types vs JVM types

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    clojure-core-candidatesClojure core function candidates for PTC-LispenhancementNew feature or requestptc-lispPTC-Lisp language implementation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions