Module fungi_lang::examples
[−]
[src]
Examples of data structures and algorithms in Fungi.
Basics
Small examples, showing the basics of the novel language features of Fungi:
basic_read_effects
--- read effects track the reference cells and thunks that a Fungi program observes and forces.basic_write_effects
--- write effects track the reference cells and thunks that a Fungi program allocates.basic_write_scope
--- write scopes distinctly qualify written names for different dynamic calling contexts.
Sequences
Sequences of natural numbers, represented as probabilistically-balanced binary trees (level trees):
seq_max
--- finds the maximum element in a sequence.seq_filter
--- filters a sequence of elements, producing a new (smaller) sequence.
Sets
In progress
Sets of natural numbers, represented as probabilistically-balanced binary hash tries:
trie_join
--- joins two sets (as tries) into a single set (as a trie).trie_of_seq
--- builds a set of elements (as a hash trie) from a sequence of elements (as a level tree).
Quickhull
Computes the convex hull, in sorted order, of an unordered sequence of points in 2D space.
TODO
Modules
basic_read_effects | |
basic_write_effects | |
basic_write_scope | |
seq_filter |
Filter a sequence of elements, producing a new (smaller) sequence |
seq_max |
Find the maximum element in a sequence |
trie |