diff options
author | Eduardo Julian | 2021-08-24 05:23:45 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-08-24 05:23:45 -0400 |
commit | 36303d6cb2ce3ab9e36d045b9516c997bd461862 (patch) | |
tree | b9d2f1495143054d61d9af129f36833624db9dac /stdlib/source/documentation/lux/data/collection/tree.lux | |
parent | ec1f31b5a1492d5e0ab260397291d4449483bbd9 (diff) |
Outsourced the syntax for labelled type definitions to macros.
Diffstat (limited to 'stdlib/source/documentation/lux/data/collection/tree.lux')
-rw-r--r-- | stdlib/source/documentation/lux/data/collection/tree.lux | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/stdlib/source/documentation/lux/data/collection/tree.lux b/stdlib/source/documentation/lux/data/collection/tree.lux new file mode 100644 index 000000000..310073287 --- /dev/null +++ b/stdlib/source/documentation/lux/data/collection/tree.lux @@ -0,0 +1,55 @@ +(.module: + [library + [lux (#- list) + ["$" documentation (#+ documentation:)] + [control + ["<>" parser + ["<.>" code]]] + [data + ["." text (#+ \n) + ["%" format (#+ format)]]] + [macro + ["." template]]]] + [\\library + ["." /]] + ["." / #_ + ["#." finger] + ["#." zipper]]) + +(documentation: /.Tree + "A generic tree data-structure.") + +(documentation: /.flat + "All the leaf values of the tree, in order." + [(flat tree)]) + +(documentation: /.leaf + "" + [(leaf value)]) + +(documentation: /.branch + "" + [(branch value children)]) + +(documentation: /.tree + "Tree literals." + [(: (Tree Nat) + (tree 12 + {34 {} + 56 {} + 78 {90 {}}}))]) + +(.def: .public documentation + (.List $.Module) + ($.module /._ + "" + [..Tree + ..flat + ..leaf + ..branch + ..tree + ($.default /.equivalence) + ($.default /.functor) + ($.default /.mix)] + [/finger.documentation + /zipper.documentation])) |