AetherlangLib: Crystals

"Crystals" is a library that provides tools for managing Aetherlang's unordered collections - crystals. For the most part, they act like sets of data. The difference is that crystals are immutable.

WARNING: THIS LIBRARY IS YET TO BE IMPROVED. THERE IS NO WAY YOU CAN USE PHANTOM CRYSTALS FOR NOW.

Types

crystals.crystal
crystals.phantomcrystal

Functions


crystal arg1...argN @-> crystals.crystal
@ where arg1...argN: any
@ makes a crystal of given elements.

add cr val @-> crystals.crystal
@ where cr: crystals.crystal
@       val: any
@ returns CR but with additional VAL in it.

remove cr val @-> crystals.crystal
@ where cr: crystals.crystal
@       val: any
@ returns CR but without VAL in it. returns the same CR if there's no VAL in it.

Note that contains? from base works perfectly fine with crystals too, except it will always return 1 or void, since there is no indexing in crystals.