import * as fun from "https://deno.land/x/fun@v2.0.0/tree.ts";
This file contains a collection of utilities and algebraic structure implementations for Tree.
Functions
The apply function for Applicable. | |
Converts a Forest into a tree representation. | |
Converts a Tree into a tree representation. | |
The flatmap function for Flatmappable. | |
f fold | The fold function for Foldable. |
Create an instance of Comparable<Tree> from an instance of Comparable. | |
Get an instance of Showable<Tree> from an instance of Showable. | |
f map | The map function for Mappable. |
The match function is a recursive fold that collapses a Tree into a single value I. It does this from the head of the Tree first. | |
The traverse function for Traversable. | |
f tree | This is a constructor function, taking a single value A and optionally an array of Tree and returning a Tree. |
The unwrap function for Unwrappable | |
f wrap | The wrap function for Wrappable. |
Interfaces
KindTree is the Kind implementation for a Tree. |
Type Aliases
AnyTree is useful as an extends constraint on a generic type. | |
A Forest is an array of Trees. | |
T Tree | A Tree is a node with a single value and a Forest of children. |
TypeOf is a type extractor that returns the inner type A of a Tree. |