Like a regular array, a set can store many items. However, duplicate items are ignored - it
only keeps unique items. ixfx's Sets.ISetMutable allows for considering items as identical by value, not
just by reference as the default JS Set operates
// If library is stored two directories up under `ixfx/` import {map} from'../../ixfx/dist/collections.js'; // Import from web import {map} from'https://unpkg.com/ixfx/dist/collections.js'
This module includes a variety of techniques for storing and retrieving data.
Ranked collections
Queues
A queue has the logic of waiting in line at the bakery. First in, first out.
Stacks
A stack has the logic of stacked plates. First in, last out.
Sets
Like a regular array, a set can store many items. However, duplicate items are ignored - it only keeps unique items. ixfx's Sets.ISetMutable allows for considering items as identical by value, not just by reference as the default JS Set operates
Maps
Trees
Graphs
Etc
Example: Importing