SYNOPSIS
This is an Imperative Trie implementation. functional-trie is the functional version.
USAGE
const Vertex = // to start with, the graph is just a single vertexconst vertex = // now lets add an edge to the vertex named "bob" that points to another vertex with the value "alice"vertex // if paths have more than one name in them they can arraysvertex// now the graph looks like:// [vertex]---friend--->[alice]---brother-->[bob] // path names and vertex values can be anythingvertex // edges are stored in a Mapvertexedges // Map{} // you can also iterate a pathlet vertices = ...vertex // or the entire trievertices = ...vertex // delete an edgevertex = vertex// now the vertex is emptyvertexisEmpty // true