diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux/target/python.lux | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/stdlib/source/library/lux/target/python.lux b/stdlib/source/library/lux/target/python.lux index 6ce709536..03033e4be 100644 --- a/stdlib/source/library/lux/target/python.lux +++ b/stdlib/source/library/lux/target/python.lux @@ -17,7 +17,7 @@ [collection ["[0]" list (.open: "[1]#[0]" functor mix)]]] [macro - [syntax (.only syntax:)] + [syntax (.only syntax)] ["[0]" template] ["[0]" code]] [math @@ -451,15 +451,17 @@ (representation on)))) ) -(syntax: (arity_inputs [arity <code>.nat]) - (in (case arity - 0 (.list) - _ (|> (-- arity) - (enum.range n.enum 0) - (list#each (|>> %.nat code.local)))))) - -(syntax: (arity_types [arity <code>.nat]) - (in (list.repeated arity (` (Expression Any))))) +(def: arity_inputs + (syntax (_ [arity <code>.nat]) + (in (case arity + 0 (.list) + _ (|> (-- arity) + (enum.range n.enum 0) + (list#each (|>> %.nat code.local))))))) + +(def: arity_types + (syntax (_ [arity <code>.nat]) + (in (list.repeated arity (` (Expression Any)))))) (template [<arity> <function>+] [(with_expansions [<inputs> (arity_inputs <arity>) |