Module fungi_lang::examples [] [src]

Examples of data structures and algorithms in Fungi.

Basics

  • basic_write_scope demonstrate write scopes, which 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 build 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_write_scope
seq_filter

Filter a sequence of elements, producing a new (smaller) sequence

seq_max

Find the maximum element in a sequence

trie