diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/documentation/lux/math/infix.lux | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/stdlib/source/documentation/lux/math/infix.lux b/stdlib/source/documentation/lux/math/infix.lux index 19d21669b..c542dcf99 100644 --- a/stdlib/source/documentation/lux/math/infix.lux +++ b/stdlib/source/documentation/lux/math/infix.lux @@ -16,11 +16,27 @@ \n "If you want your binary function to work well with it." \n "Then take the argument to the right (y) as your first argument," \n "and take the argument to the left (x) as your second argument.") - [(infix [x * +10])] - [(infix [[x + y] * [x - y]])] - [(infix [sin [x + y]])] - [(infix [[x < y] and [y < z]])] - [(infix [(* 3 9) gcd 450])]) + ["Binary functions" + (infix [x * +10]) + "=>" + (* +10 x)] + ["Nested infix" + (infix [[x + y] * [x - y]]) + "=>" + (* (- y x) (+ y x))] + ["Unary functions" + (infix [sin [x + y]]) + "=>" + (sin (+ y x))] + ["Also works with logic" + (infix [[x < y] and [y < z]]) + "=>" + (and (< z y) + (< y x))] + ["Forms are left as-is" + (infix [(* 3 9) gcd 450]) + "=>" + (gcd 450 (* 3 9))]) (.def: .public documentation (.List $.Module) |