chain

fun chain(first: Node, second: Node, vararg rest: Node): Node

Connects first, second, and each node in rest in order by adding an edge from each node to the next. Returns the last node so the chain can continue from it: chain(Start, a, b) is short for Start.then(a).then(b).


fun Node.chain(first: Node, second: Node, vararg rest: Node): Node

Connects this node to first, second, and each node in rest in order by adding an edge from each node to the next, and returns the last node. a.chain(b, c) is short for a.then(b).then(c). Unlike the chain overload that takes the first node as an argument, this form can continue a fluent chain, such as after joinTo.