8000 Add Set / UnorderedSet · Issue #98 · kexhq/kex · GitHub
[go: up one dir, main page]

Skip to content

Add Set / UnorderedSet #98

Closed
Closed

Description

@akoskovacs

Summary

The collection suite lacks sets. Two types:

  • Set — ordered set (sorted iteration, Orderable elements)
  • UnorderedSet — hash-based (fast membership, unspecified iteration order)

Surface

Follow the existing collection conventions: make Set do ... end methods (UFCS: xs.contains?, xs + [y], xs - other), construction from any [A], and the usual HOF surface — map yielding a new set, filter, intersect/union/difference at minimum.

To decide first

Prelude placement requires hashing/equality intrinsics on both backends (records are tagged tuples on BEAM), and what == means for user types in a set (structural, via existing equality).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0