Example: Tree
A node holding an integer value and links to child nodes.Extends · closed
| value The integer stored at this node. | ||
| children Links to this node's child trees. | of | optional |
A tree node: an integer value and a list of links to child trees. The type refers to itself, which works because schemas reference each other by name.
This page describes the example/tree type, one of the example schemas. The formal schema is attached as the schemaDefinition in this page's metadata, so the app can show it and create values of this type.
See also
comment: another self-referencing type.
json: a recursive union.
References: why recursion works.
Examples: every example, grouped by feature.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime
Powered by Seed HypermediaOpen App