diff options
author | Eduardo Julian | 2019-04-06 23:11:20 -0400 |
---|---|---|
committer | Eduardo Julian | 2019-04-06 23:11:20 -0400 |
commit | 2a05d8f3711d2e1b6fcccd9a2869478197386a7f (patch) | |
tree | 12206ff1f282943225b795334e38c0ac1e935e77 /stdlib/source/lux/abstract | |
parent | a75f032ff219fdd639580455a6d3e83fd05d5592 (diff) |
Moved "lux/cli", "lux/io" and "lux/function" under "lux/control".
Diffstat (limited to 'stdlib/source/lux/abstract')
-rw-r--r-- | stdlib/source/lux/abstract/order.lux | 5 | ||||
-rw-r--r-- | stdlib/source/lux/abstract/predicate.lux | 15 |
2 files changed, 11 insertions, 9 deletions
diff --git a/stdlib/source/lux/abstract/order.lux b/stdlib/source/lux/abstract/order.lux index 85b33fa18..32df7d1af 100644 --- a/stdlib/source/lux/abstract/order.lux +++ b/stdlib/source/lux/abstract/order.lux @@ -1,6 +1,7 @@ (.module: [lux #* - function] + [control + ["." function]]] [// [functor (#+ Contravariant)] ["." equivalence (#+ Equivalence)]]) @@ -21,7 +22,7 @@ (def: #export (order equivalence <) (All [a] (-> (Equivalence a) (-> a a Bit) (Order a))) - (let [> (flip <)] + (let [> (function.flip <)] (structure (def: &equivalence equivalence) (def: < <) diff --git a/stdlib/source/lux/abstract/predicate.lux b/stdlib/source/lux/abstract/predicate.lux index faa1859b9..de3fc087d 100644 --- a/stdlib/source/lux/abstract/predicate.lux +++ b/stdlib/source/lux/abstract/predicate.lux @@ -1,6 +1,7 @@ (.module: [lux #* - ["." function]] + [control + ["." function]]] [// [monoid (#+ Monoid)] [functor (#+ Contravariant)]]) @@ -10,7 +11,7 @@ (template [<identity-name> <identity-value> <composition-name> <composition>] [(def: #export <identity-name> - (All [a] (Predicate a)) + Predicate (function.constant <identity-value>)) (def: #export (<composition-name> left right) @@ -19,8 +20,8 @@ (<composition> (left value) (right value))))] - [none #0 union or] - [all #1 intersection and] + [none #0 unite or] + [all #1 intersect and] ) (template [<name> <identity> <composition>] @@ -30,8 +31,8 @@ (def: identity <identity>) (def: compose <composition>))] - [Union@Monoid none union] - [Intersection@Monoid all intersection] + [union ..none ..unite] + [intersection ..all ..intersect] ) (def: #export (complement predicate) @@ -50,7 +51,7 @@ (Predicate a))) (|>> (predicate (rec predicate)))) -(structure: #export _ +(structure: #export contravariant (Contravariant Predicate) (def: (map-1 f fb) |