(;module: lux (lux (control monoid))) ## [Functions] (def: #export (const c) {#;doc "Create constant functions."} (All [a b] (-> a (-> b a))) (function [_] c)) (def: #export (flip f) {#;doc "Flips the order of the arguments of a function."} (All [a b c] (-> (-> a b c) (-> b a c))) (function [x y] (f y x))) ## [Structures] (struct: #export Monoid (Monoid (All [a] (-> a a))) (def: identity id) (def: compose .))