rebirth: Add `begin'

This isn't used yet, but it's a nice thing to have available.

* build-aux/bootstrap/rebirth/es.scm (begin): Add syntatic form.
master
Mike Gerwitz 2018-02-08 23:06:27 -05:00
parent 9eb8355e22
commit ec43d7717a
Signed by: mikegerwitz
GPG Key ID: 8C917B7F5DC51BA2
1 changed files with 7 additions and 0 deletions

View File

@ -192,6 +192,13 @@
(map cdr clauses)))
"}})()")
;; We can just re-use `let' for `begin' since it already does exactly
;; what we need it to
(define-macro (begin . exprs)
(`quote (let () (unquote@ exprs))))
;; We unfortunately have to worry about environment mutability in the
;; current implementation. Since variables within environments are
;; implemented using ECMAScript's prototype chain, any sets affect the