From 1ef969c8ce0f1a83ffa8d26d779806190ac3eced Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 28 Nov 2017 20:09:42 -0400 Subject: - Re-named the "." function to "compose" and moved it to lux/function. --- stdlib/source/lux.lux | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'stdlib/source/lux.lux') diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux index 6470e5c3b..0087a8d89 100644 --- a/stdlib/source/lux.lux +++ b/stdlib/source/lux.lux @@ -2095,7 +2095,7 @@ _ (fail "Wrong syntax for <|")})) -(def:''' #export (. f g) +(def:''' (compose f g) (list [(tag$ ["lux" "doc"]) (text$ "Function composition.")]) (All [a b c] @@ -2208,7 +2208,7 @@ (if (every? (function' [sample] ("lux nat =" num-bindings sample)) (map list/size data')) (|> data' - (join-map (. apply (make-env bindings'))) + (join-map (compose apply (make-env bindings'))) return) (fail "Irregular arguments tuples for do-template."))) @@ -5011,7 +5011,7 @@ (let [apply (: (-> RepEnv (List Code)) (function [env] (map (apply-template env) templates)))] (|> data' - (join-map (. apply (make-env bindings'))) + (join-map (compose apply (make-env bindings'))) wrap)) #;None))) (#Some output) @@ -5055,8 +5055,8 @@ [[_ _ column] (#Record pairs)] (list/fold n/min column - (list/compose (map (. find-baseline-column first) pairs) - (map (. find-baseline-column second) pairs))) + (list/compose (map (|>> first find-baseline-column) pairs) + (map (|>> second find-baseline-column) pairs))) )) (type: Doc-Fragment @@ -5100,7 +5100,7 @@ (def: tag/encode (-> Ident Text) - (. (text/compose "#") ident/encode)) + (|>> ident/encode (text/compose "#"))) (do-template [ ] [(def: #export ( input) @@ -5141,7 +5141,7 @@ (def: rejoin-all-pairs (-> (List [Code Code]) (List Code)) - (. list/join (map rejoin-pair))) + (|>> (map rejoin-pair) list/join)) (def: (doc-example->Text prev-cursor baseline example) (-> Cursor Nat Code [Cursor Text]) @@ -5212,7 +5212,7 @@ x)))"} (return (list (` [(~ cursor-code) (#;Text (~ (|> tokens - (map (. doc-fragment->Text identify-doc-fragment)) + (map (|>> identify-doc-fragment doc-fragment->Text)) text/join text$)))])))) -- cgit v1.2.3