Skip to content

Collections

The Collections module has a variety of data-structures to supplement those already available in the web platform.

In brief:

  • Queue: first-in, first-out ranked data. Like the queue at a bakery
  • Stack: first-in, last-out ranked data. Like a stack of plates, you can’t just grab the one at the bottom
  • Set: unique data
  • Map: relate keys with values, like a dictionary
  • Tree: structured data of parents and children
  • Graph: relations
// Whole module
import * as Collections from "@ixfx/collections"
// Single function
import { circularArray } from "@ixfx/collections"
// One of several modules
import { Collections, Modulation, Flow, Data } from "@ixfx"
// And within your HTML's <HEAD> </HEAD> block:
<script type="importmap">{ "imports": { "@ixfx":"/ixfx/index.js", "@ixfx/": "/ixfx/" } }</script>