aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/ruby/function.jvm.lux
diff options
context:
space:
mode:
authorEduardo Julian2018-06-15 00:11:33 -0400
committerEduardo Julian2018-06-15 00:11:33 -0400
commitbcd3d9ee8f6797f758a2abea98d5cb6a74cc7df0 (patch)
treeb122b9ecf2d5333ba97cffbadfeee00eba2e1cf8 /new-luxc/source/luxc/lang/translation/ruby/function.jvm.lux
parent0190e084c6f44be32ea2bc5a89ef55b52bdc789b (diff)
- WIP: Adjustments to new-luxc based on recent changes to stdlib.
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/ruby/function.jvm.lux')
-rw-r--r--new-luxc/source/luxc/lang/translation/ruby/function.jvm.lux8
1 files changed, 4 insertions, 4 deletions
diff --git a/new-luxc/source/luxc/lang/translation/ruby/function.jvm.lux b/new-luxc/source/luxc/lang/translation/ruby/function.jvm.lux
index f5d64459d..aecabc914 100644
--- a/new-luxc/source/luxc/lang/translation/ruby/function.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/ruby/function.jvm.lux
@@ -23,7 +23,7 @@
(def: (input-declaration registers)
(-> (List Register) Statement)
- (ruby.set! (list.concat (list (list/map (|>> n/inc referenceT.variable) registers)
+ (ruby.set! (list.concat (list (list/map (|>> inc referenceT.variable) registers)
(list "_")))
"curried"))
@@ -51,10 +51,10 @@
(//.with-anchor [function-name +1]
(translate bodyS))))
closureO+ (monad.map @ referenceT.translate-variable env)
- #let [args-initsO+ (input-declaration (list.n/range +0 (n/dec arity)))
+ #let [args-initsO+ (input-declaration (list.n/range +0 (dec arity)))
selfO (ruby.set! (list (referenceT.variable +0)) function-name)
- arityO (|> arity nat-to-int %i)
- limitO (|> arity n/dec nat-to-int %i)]]
+ arityO (|> arity .int %i)
+ limitO (|> arity dec .int %i)]]
(wrap (with-closure closureO+
(ruby.lambda (#.Some function-name)
(list (ruby.splat "curried"))