add-vertex ( vertex edges graph -- )
Factor handbook » The language » Collections » Directed graph utilities

Next:remove-vertex ( vertex edges graph -- )


Vocabulary
graphs

Inputs
vertexan object
edgesa sequence
graphan assoc mapping vertices to hash-set of edges


Outputs
None

Word description
Adds a vertex to a directed graph, with edges as the outward edges from the vertex.

Side effects
Modifies graph

Definition