diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/loop.lux | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/loop.lux b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/loop.lux index 9ccd0151e..b69ce6b57 100644 --- a/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/loop.lux +++ b/stdlib/source/library/lux/tool/compiler/language/lux/phase/generation/ruby/loop.lux @@ -33,13 +33,12 @@ (def: (setup offset bindings body) (-> Register (List Expression) Statement Statement) - (|> bindings - list.enumeration - (list#each (function (_ [register value]) - (_.set (list (//case.register (n.+ offset register))) - value))) - list.reversed - (list#mix _.then body))) + (let [variables (|> bindings + list.enumeration + (list#each (|>> product.left (n.+ offset) //case.register)))] + ($_ _.then + (_.set variables (_.multi bindings)) + body))) (def: symbol (_.symbol "lux_continue")) |