link
typelink is one arc of the worked example: a small directed delivery network where the obvious route is the wrong one twice over.
Value
v0.link
network
[]v0.link- OID
- 0e2a0a…dd35:4
network details
source
untyped stringThe source of the worked example, and a node nothing reaches, to show that unreachable is an answer rather than an error.
Value
"depot"
isolated
untyped stringThe source of the worked example, and a node nothing reaches, to show that unreachable is an answer rather than an error.
Value
"quarry"
fanout
[]stringfanout is the determinism example: one hub, three spokes, all at the same cost. Which one settles first is decided by the order they were declared in, never by a map.
- OID
- 0e2a0a…dd35:13
fanout details
Render
func(path string) stringRender renders the demo for gnoweb. Render("") / Render("/") -> the full demo
- OID
- 0e2a0a…dd35:14
Render details
route
func(path []string) stringroute joins a path with an arrow. Each node name is escaped on its own and the separator never is: running the whole joined string through the escaper would turn the arrows into a literal backslash soup, which is the bug this spelling exists to avoid.
- OID
- 0e2a0a…dd35:16
route details
names
func(in []string) stringnames renders a declaration order as a comma-separated list, escaped the same way.
- OID
- 0e2a0a…dd35:17
names details
settleFanout
func(spokes []string) []stringsettleFanout builds the hub-and-spoke graph with the spokes declared in the given order and returns the order the search settles them in.
- OID
- 0e2a0a…dd35:18
settleFanout details
reverse
func(in []string) []stringreverse copies a slice back to front. Written out rather than imported because there is no sensible shared home for three lines of it.
- OID
- 0e2a0a…dd35:19