3 if(!exists("..types..")) source("types.r")
5 new
.Env
<- function(outer
=emptyenv(), binds
=list(), exprs
=list()) {
6 e
<- structure(new
.env(parent
=outer
), class
="Env")
8 if (length(binds
) > 0) {
9 for(i
in seq(length(binds
))) {
13 slice(exprs
, i
, length(exprs
))
23 Env
.find
<- function(e
, key
) {
24 if (exists(key
, envir
=e
, inherits
=FALSE)) {
26 } else if (!identical(parent
.env(e
), emptyenv())) {
27 Env
.find(parent
.env(e
), key
)
33 Env
.set
<- function(e
, key
, val
) {
38 Env
.get
<- function(e
, key
) {
40 if (.nil_q(e
)) throw(concat("'", key
, "' not found"))