From 36303d6cb2ce3ab9e36d045b9516c997bd461862 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 24 Aug 2021 05:23:45 -0400 Subject: Outsourced the syntax for labelled type definitions to macros. --- stdlib/source/specification/compositor/generation/function.lux | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'stdlib/source/specification/compositor/generation/function.lux') diff --git a/stdlib/source/specification/compositor/generation/function.lux b/stdlib/source/specification/compositor/generation/function.lux index 8a090094f..36b45c283 100644 --- a/stdlib/source/specification/compositor/generation/function.lux +++ b/stdlib/source/specification/compositor/generation/function.lux @@ -30,11 +30,11 @@ (def: arity (Random Arity) - (|> r.nat (r\map (|>> (n.% max_arity) (n.max 1))))) + (|> r.nat (r\each (|>> (n.% max_arity) (n.max 1))))) (def: (local arity) (-> Arity (Random Register)) - (|> r.nat (r\map (|>> (n.% arity) ++)))) + (|> r.nat (r\each (|>> (n.% arity) ++)))) (def: function (Random [Arity Register Synthesis]) @@ -51,10 +51,10 @@ (-> Runner Test) (do {! r.monad} [[arity local functionS] ..function - partial_arity (|> r.nat (\ ! map (|>> (n.% arity) (n.max 1)))) + partial_arity (|> r.nat (\ ! each (|>> (n.% arity) (n.max 1)))) inputs (r.list arity r.safe_frac) .let [expectation (maybe.trusted (list.item (-- local) inputs)) - inputsS (list\map (|>> synthesis.f64) inputs)]] + inputsS (list\each (|>> synthesis.f64) inputs)]] ($_ _.and (_.test "Can read arguments." (|> (synthesis.function/apply {#synthesis.function functionS @@ -75,7 +75,7 @@ (or (n.= 1 arity) (let [environment (|> partial_arity (enum.range n.enum 1) - (list\map (|>> #reference.Local))) + (list\each (|>> #reference.Local))) variableS (if (n.<= partial_arity local) (synthesis.variable/foreign (-- local)) (synthesis.variable/local (|> local (n.- partial_arity)))) -- cgit v1.2.3