diff options
Diffstat (limited to 'stdlib/source/documentation/lux/data/product.lux')
-rw-r--r-- | stdlib/source/documentation/lux/data/product.lux | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/stdlib/source/documentation/lux/data/product.lux b/stdlib/source/documentation/lux/data/product.lux new file mode 100644 index 000000000..78d0d5aaa --- /dev/null +++ b/stdlib/source/documentation/lux/data/product.lux @@ -0,0 +1,52 @@ +(.module: + [library + [lux (#- nat int rev list type or and) + ["$" documentation (#+ documentation:)] + [data + [text (#+ \n) + ["%" format (#+ format)]]] + [macro + ["." template]]]] + [\\library + ["." /]]) + +(documentation: /.left + "The left side of a pair.") + +(documentation: /.right + "The right side of a pair.") + +(documentation: /.curried + "Converts a 2-argument function into nested single-argument functions." + [(curried f)]) + +(documentation: /.uncurried + "Converts nested single-argument functions into a 2-argument function." + [(uncurried f)]) + +(documentation: /.swapped + "" + [(swapped [left right])]) + +(documentation: /.then + "Apply functions to both sides of a pair." + [(then f g)]) + +(documentation: /.forked + "Yields a pair by applying both functions to a single value." + [(forked f g)]) + +(.def: .public documentation + (.List $.Module) + ($.module /._ + "" + [..left + ..right + ..curried + ..uncurried + ..swapped + ..then + ..forked + ($.default /.equivalence) + ($.default /.hash)] + [])) |