Std.Graph.addEdge
1 declaration
fn
addEdge: &Std.Graph.Graph[N] -> N -> N -> Std.Graph.Graph[N] where N: OrdThis is a callable function.
What it does
The graph with an edge from one node to another.
Both ends are added as nodes. An edge to a node the caller never mentioned
is still a statement that the node exists, and requiring it to be declared
first would only make callers write it twice.
Read the signature
- The text after the name is the type checked by Pudu.
- Read arrows from left to right: inputs come first, and the final type is returned.
- & borrows a value for this call instead of moving or copying it.
- Names inside [ ] are type arguments, such as the item type held by a collection.
