Posts

☯️ v0.0.0-dev.3 — Classifier & TrueSet

☯️ v0.0.0-dev.3 — Classifier & TrueSet We’re thrilled to announce   v0.0.0-dev.3   of   @fizzwiz/sorted , introducing two powerful new abstractions:   Classifier   and   TrueSet . This release takes the library far beyond simple sorted collections, enabling   hierarchical keys ,   prefix queries , and   representation-based equivalence . ๐Ÿ”ง Core Enhancements Classifier   — a rich, multidimensional map A   Classifier   stores entries whose keys are   arrays (any iterable) . It supports: Storing multiple items per key Efficient   prefix queries   with wildcards Sorted traversal of both keys and items Flexible equivalence via custom sorting rules TrueSet   — a representation-based set A   TrueSet   defines equivalence using a   representation function   ( repr ). It enables: Equivalence among   objects , not just primitives Aggregation of equivalent items in sorted, enumerable class...

๐Ÿง  Contemplating a True Set

๐Ÿง  Equivalence in JavaScript: Contemplating a True Set In JavaScript,   equivalence   behaves differently depending on whether you're working with primitive or non-primitive types. For   primitives —such as numbers, booleans, strings, and symbols—equivalence is determined by comparing actual values. If two variables hold the same value, they are considered equivalent. However, for   objects and arrays , equivalence is   by reference . Two arrays   [0]   and   [0]   are not considered equal because they are separate instances, even though they contain identical content. ๐Ÿ”ฌ Snippet 1: Equivalence by Value and by Reference new Set ([ 0 , 0 ]); // => Set { 0 } new Set ([[ 0 ], [ 0 ]]); // => Set { [0], [0] } JavaScript’s   Set   treats the two   0   values as equivalent but considers   [0]   and   [0]   as distinct because they are different object instances. This reveals JavaScript’s mini...