Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

v0 state

Back to all declarations

source

untyped string

The 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 string

The source of the worked example, and a node nothing reaches, to show that unreachable is an answer rather than an error.

Value

"quarry"

fanout

[]string (len=3)

fanout 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.

Open
OID
0e2a0a…dd35:13
fanout details (len=3)

+3 more Inspect slice

Render

func(path string) string

Render renders the demo for gnoweb. Render("") / Render("/") -> the full demo

Open
OID
0e2a0a…dd35:14
Render details

Inspect func

route

func(path []string) string

route 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.

Open
OID
0e2a0a…dd35:16
route details

Inspect func

names

func(in []string) string

names renders a declaration order as a comma-separated list, escaped the same way.

Open
OID
0e2a0a…dd35:17
names details

Inspect func

settleFanout

func(spokes []string) []string

settleFanout builds the hub-and-spoke graph with the spokes declared in the given order and returns the order the search settles them in.

Open
OID
0e2a0a…dd35:18
settleFanout details

Inspect func

reverse

func(in []string) []string

reverse copies a slice back to front. Written out rather than imported because there is no sensible shared home for three lines of it.

Open
OID
0e2a0a…dd35:19
reverse details

Inspect func
network : []v0.link (len=7) Inspect
source : untyped string ="depot"
isolated : untyped string ="quarry"
fanout : []string (len=3) Inspect
Render : func(path string) string Inspect
route : func(path []string) string Inspect
names : func(in []string) string Inspect
settleFanout : func(spokes []string) []string Inspect
reverse : func(in []string) []string Inspect