From 891b1cfc82322f8017f0a4f6b707d6fe52024545 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 3 Sep 2021 21:51:30 -0400 Subject: Unified tuple and record syntax. --- .../compositor/generation/function.lux | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 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 36b45c283..d97b2c02c 100644 --- a/stdlib/source/specification/compositor/generation/function.lux +++ b/stdlib/source/specification/compositor/generation/function.lux @@ -43,9 +43,9 @@ local (..local arity)] (in [arity local (synthesis.function/abstraction - {#synthesis.environment (list) + [#synthesis.environment (list) #synthesis.arity arity - #synthesis.body (synthesis.variable/local local)})]))) + #synthesis.body (synthesis.variable/local local)])]))) (def: .public (spec run) (-> Runner Test) @@ -57,18 +57,18 @@ inputsS (list\each (|>> synthesis.f64) inputs)]] ($_ _.and (_.test "Can read arguments." - (|> (synthesis.function/apply {#synthesis.function functionS - #synthesis.arguments inputsS}) + (|> (synthesis.function/apply [#synthesis.function functionS + #synthesis.arguments inputsS]) (run "with_local") (//case.verify expectation))) (_.test "Can partially apply functions." (or (n.= 1 arity) (let [preS (list.first partial_arity inputsS) postS (list.after partial_arity inputsS) - partialS (synthesis.function/apply {#synthesis.function functionS - #synthesis.arguments preS})] - (|> (synthesis.function/apply {#synthesis.function partialS - #synthesis.arguments postS}) + partialS (synthesis.function/apply [#synthesis.function functionS + #synthesis.arguments preS])] + (|> (synthesis.function/apply [#synthesis.function partialS + #synthesis.arguments postS]) (run "partial_application") (//case.verify expectation))))) (_.test "Can read environment." @@ -81,15 +81,15 @@ (synthesis.variable/local (|> local (n.- partial_arity)))) inner_arity (n.- partial_arity arity) innerS (synthesis.function/abstraction - {#synthesis.environment environment + [#synthesis.environment environment #synthesis.arity inner_arity - #synthesis.body variableS}) + #synthesis.body variableS]) outerS (synthesis.function/abstraction - {#synthesis.environment (list) + [#synthesis.environment (list) #synthesis.arity partial_arity - #synthesis.body innerS})] - (|> (synthesis.function/apply {#synthesis.function outerS - #synthesis.arguments inputsS}) + #synthesis.body innerS])] + (|> (synthesis.function/apply [#synthesis.function outerS + #synthesis.arguments inputsS]) (run "with_foreign") (//case.verify expectation))))) ))) -- cgit v1.2.3