aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/control/concatenative.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/library/lux/control/concatenative.lux13
1 files changed, 6 insertions, 7 deletions
diff --git a/stdlib/source/library/lux/control/concatenative.lux b/stdlib/source/library/lux/control/concatenative.lux
index 554e6b21d..622bb213b 100644
--- a/stdlib/source/library/lux/control/concatenative.lux
+++ b/stdlib/source/library/lux/control/concatenative.lux
@@ -69,9 +69,9 @@
(meta.failure (format "Cannot expand to more than a single AST/Code node:" text.new_line
(|> expansion (list\map %.code) (text.join_with " ")))))))
-(syntax: .public (=> {aliases aliases^}
- {inputs stack^}
- {outputs stack^})
+(syntax: .public (=> [aliases aliases^
+ inputs stack^
+ outputs stack^])
{#.doc (example "Concatenative function types."
(=> [Nat] [Nat])
(All [a] (-> a (=> [] [a])))
@@ -111,7 +111,7 @@
(function (_ [_ top])
top))
-(syntax: .public (||> {commands (<>.some <code>.any)})
+(syntax: .public (||> [commands (<>.some <code>.any)])
{#.doc (example "A self-contained sequence of concatenative instructions."
(is? value
(||> (..push sample)))
@@ -134,8 +134,7 @@
(<>.and (<>\in (` .private)) private)
)))
-(syntax: .public (word:
- {[export_policy name annotations type commands] ..word})
+(syntax: .public (word: [[export_policy name annotations type commands] ..word])
{#.doc (example "A named concatenative function."
(word: square
(=> [Nat] [Nat])
@@ -147,7 +146,7 @@
(~ type)
(|>> (~+ commands)))))))
-(syntax: .public (apply {arity (<>.only (n.> 0) <code>.nat)})
+(syntax: .public (apply [arity (<>.only (n.> 0) <code>.nat)])
{#.doc (example "A generator for functions that turn arity N functions into arity N concatenative functions."
(: (=> [Nat] [Nat])
((apply 1) inc)))}