diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux/abstract/order.lux | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/stdlib/source/library/lux/abstract/order.lux b/stdlib/source/library/lux/abstract/order.lux index 3eaafaf3a..280226ccd 100644 --- a/stdlib/source/library/lux/abstract/order.lux +++ b/stdlib/source/library/lux/abstract/order.lux @@ -19,30 +19,37 @@ ) (type: #export (Comparison a) + {#.doc (doc "An arbitrary comparison between two values, with the knowledge of how to order them.")} (-> (Order a) a a Bit)) (def: #export (<= order parameter subject) + {#.doc (doc "Less than or equal.")} Comparison (or (\ order < parameter subject) (\ order = parameter subject))) (def: #export (> order parameter subject) + {#.doc (doc "Greater than.")} Comparison (\ order < subject parameter)) (def: #export (>= order parameter subject) + {#.doc (doc "Greater than or equal.")} Comparison (or (\ order < subject parameter) (\ order = subject parameter))) (type: #export (Choice a) + {#.doc (doc "A choice comparison between two values, with the knowledge of how to order them.")} (-> (Order a) a a a)) (def: #export (min order x y) + {#.doc (doc "Minimum.")} Choice (if (\ order < y x) x y)) (def: #export (max order x y) + {#.doc (doc "Maximum.")} Choice (if (\ order < y x) y x)) |