diff options
author | Eduardo Julian | 2020-05-11 23:07:20 -0400 |
---|---|---|
committer | Eduardo Julian | 2020-05-11 23:07:20 -0400 |
commit | 33090b088deb20180108e6713309e0dfc627c6e5 (patch) | |
tree | 1f76aaefe23ce5cecbd3c0f1c1eab3c630ed6cf1 /stdlib/source/lux/abstract | |
parent | 5e31528ee33b1b6aceac4dc2eeda82f44e463df3 (diff) |
Now storing and loading extensions in the cache.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/abstract/monad.lux | 4 | ||||
-rw-r--r-- | stdlib/source/lux/abstract/order.lux | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/stdlib/source/lux/abstract/monad.lux b/stdlib/source/lux/abstract/monad.lux index 5aec10012..491f9b6a2 100644 --- a/stdlib/source/lux/abstract/monad.lux +++ b/stdlib/source/lux/abstract/monad.lux @@ -128,12 +128,12 @@ (!@map (|>> (#.Cons _x)) (recur xs')))) !@join))))) -(def: #export (filter Monad<!> f) +(def: #export (filter monad f) {#.doc "Filter the values in a list with a monadic function."} (All [! a b] (-> (Monad !) (-> a (! Bit)) (List a) (! (List a)))) - (let [(^open "!@.") Monad<!>] + (let [(^open "!@.") monad] (function (recur xs) (case xs #.Nil diff --git a/stdlib/source/lux/abstract/order.lux b/stdlib/source/lux/abstract/order.lux index 5634aac80..c28026036 100644 --- a/stdlib/source/lux/abstract/order.lux +++ b/stdlib/source/lux/abstract/order.lux @@ -44,10 +44,13 @@ Choice (if (:: order < y x) y x)) -(structure: #export contravariant (Contravariant Order) +(structure: #export contravariant + (Contravariant Order) + (def: (map-1 f order) (structure - (def: &equivalence (:: equivalence.contravariant map-1 f (:: order &equivalence))) + (def: &equivalence + (:: equivalence.contravariant map-1 f (:: order &equivalence))) (def: (< reference sample) (:: order < (f reference) (f sample)))))) |