2016-10-03 01:31:43 +03:00
|
|
|
(class +Env)
|
|
|
|
# data outer
|
2016-10-04 23:10:55 +03:00
|
|
|
(dm T (Outer Binds Exprs)
|
2016-10-03 01:31:43 +03:00
|
|
|
(=: data (new))
|
2016-10-04 23:10:55 +03:00
|
|
|
(=: outer Outer)
|
|
|
|
(for (Binds Binds Binds)
|
|
|
|
(if (<> (car Binds) '&)
|
|
|
|
(set> This (pop 'Binds) (pop 'Exprs))
|
|
|
|
(pop 'Binds)
|
|
|
|
(set> This (pop 'Binds) (MAL-list Exprs)) ) ) )
|
2016-10-03 01:31:43 +03:00
|
|
|
|
2016-10-04 23:10:55 +03:00
|
|
|
(de MAL-env (Outer Binds Exprs)
|
|
|
|
(new '(+Env) Outer Binds Exprs) )
|
2016-10-03 01:31:43 +03:00
|
|
|
|
|
|
|
(dm set> (Key Value)
|
|
|
|
(put (: data) Key Value) )
|
|
|
|
|
|
|
|
(dm get> (Key)
|
2022-01-10 02:15:40 +03:00
|
|
|
(or (get (: data) Key)
|
|
|
|
(and (: outer) (get> @ Key)) ) )
|