aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/abstract/apply.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/abstract/apply.lux')
-rw-r--r--stdlib/source/library/lux/abstract/apply.lux45
1 files changed, 22 insertions, 23 deletions
diff --git a/stdlib/source/library/lux/abstract/apply.lux b/stdlib/source/library/lux/abstract/apply.lux
index 1bf1c84ce..0685484d5 100644
--- a/stdlib/source/library/lux/abstract/apply.lux
+++ b/stdlib/source/library/lux/abstract/apply.lux
@@ -14,30 +14,29 @@
(-> (f a) (f (-> a b)) (f b)))
on)))
-(implementation: .public (composite f_monad f_apply g_apply)
+(def: .public (composite f_monad f_apply g_apply)
(All (_ F G)
(-> (Monad F) (Apply F) (Apply G)
... TODO: Replace (All (_ a) (F (G a))) with (functor.Then F G)
(Apply (All (_ a) (F (G a))))))
-
- (def: functor
- (functor.composite (the functor f_apply)
- (the functor g_apply)))
-
- (def: (on fgx fgf)
- ... TODO: Switch from this version to the one below (in comments) ASAP.
- (for @.old (let [fgf' (at f_apply on
- fgf
- (at f_monad in (function (_ gf gx) (at g_apply on gx gf))))]
- (as_expected (at f_apply on (as_expected fgx) (as_expected fgf'))))
- (let [fgf' (at f_apply on
- fgf
- (at f_monad in (function (_ gf gx) (at g_apply on gx gf))))]
- (at f_apply on fgx fgf')))
- ... (let [applyF (at f_apply on)
- ... applyG (at g_apply on)]
- ... (all applyF
- ... fgf
- ... (at f_monad in applyG)
- ... fgx))
- ))
+ (implementation
+ (def: functor
+ (functor.composite (the functor f_apply)
+ (the functor g_apply)))
+ (def: (on fgx fgf)
+ ... TODO: Switch from this version to the one below (in comments) ASAP.
+ (for @.old (let [fgf' (at f_apply on
+ fgf
+ (at f_monad in (function (_ gf gx) (at g_apply on gx gf))))]
+ (as_expected (at f_apply on (as_expected fgx) (as_expected fgf'))))
+ (let [fgf' (at f_apply on
+ fgf
+ (at f_monad in (function (_ gf gx) (at g_apply on gx gf))))]
+ (at f_apply on fgx fgf')))
+ ... (let [applyF (at f_apply on)
+ ... applyG (at g_apply on)]
+ ... (all applyF
+ ... fgf
+ ... (at f_monad in applyG)
+ ... fgx))
+ )))