diff --git a/lib/hyperscript/compiler.sx b/lib/hyperscript/compiler.sx index 912ac999..6a47db8e 100644 --- a/lib/hyperscript/compiler.sx +++ b/lib/hyperscript/compiler.sx @@ -999,23 +999,7 @@ (hs-to-sx (nth ast 1)) (hs-to-sx (nth ast 2))))) ((= head (quote do)) - (let - ((compiled (map hs-to-sx (rest ast)))) - (if - (= (len compiled) 1) - (first compiled) - (let - ((last-cmd (nth compiled (- (len compiled) 1))) - (init-cmds (reverse (rest (reverse compiled))))) - (reduce - (fn - (body cmd) - (list - (quote let) - (list (list (quote it) cmd)) - body)) - last-cmd - (reverse init-cmds)))))) + (cons (quote do) (map hs-to-sx (rest ast)))) ((= head (quote wait)) (list (quote hs-wait) (nth ast 1))) ((= head (quote wait-for)) (emit-wait-for ast)) ((= head (quote log)) diff --git a/shared/static/wasm/sx/hs-compiler.sx b/shared/static/wasm/sx/hs-compiler.sx index 912ac999..6a47db8e 100644 --- a/shared/static/wasm/sx/hs-compiler.sx +++ b/shared/static/wasm/sx/hs-compiler.sx @@ -999,23 +999,7 @@ (hs-to-sx (nth ast 1)) (hs-to-sx (nth ast 2))))) ((= head (quote do)) - (let - ((compiled (map hs-to-sx (rest ast)))) - (if - (= (len compiled) 1) - (first compiled) - (let - ((last-cmd (nth compiled (- (len compiled) 1))) - (init-cmds (reverse (rest (reverse compiled))))) - (reduce - (fn - (body cmd) - (list - (quote let) - (list (list (quote it) cmd)) - body)) - last-cmd - (reverse init-cmds)))))) + (cons (quote do) (map hs-to-sx (rest ast)))) ((= head (quote wait)) (list (quote hs-wait) (nth ast 1))) ((= head (quote wait-for)) (emit-wait-for ast)) ((= head (quote log))