aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/specification/compositor/generation/function.lux
diff options
context:
space:
mode:
authorEduardo Julian2021-09-03 21:51:30 -0400
committerEduardo Julian2021-09-03 21:51:30 -0400
commit891b1cfc82322f8017f0a4f6b707d6fe52024545 (patch)
tree957429c0a2ad850b3570492deabe054fb2ace63e /stdlib/source/specification/compositor/generation/function.lux
parente76add6e6f904677f5c09bb2a66dce283f1b848a (diff)
Unified tuple and record syntax.
Diffstat (limited to 'stdlib/source/specification/compositor/generation/function.lux')
-rw-r--r--stdlib/source/specification/compositor/generation/function.lux28
1 files changed, 14 insertions, 14 deletions
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)))))
)))