mirror of
https://github.com/janet-lang/janet
synced 2025-10-21 02:37:49 +00:00
Add docstring for make-env
This commit is contained in:
@@ -1236,6 +1236,9 @@ value, one key will be ignored."
|
|||||||
###
|
###
|
||||||
|
|
||||||
(defn make-env
|
(defn make-env
|
||||||
|
"Create a new environment table. The new environment
|
||||||
|
will inherit bindings from the parent environment, but new
|
||||||
|
bindings will not pollute the parent environment."
|
||||||
[parent &]
|
[parent &]
|
||||||
(def parent (if parent parent _env))
|
(def parent (if parent parent _env))
|
||||||
(def newenv (table/setproto @{} parent))
|
(def newenv (table/setproto @{} parent))
|
||||||
|
Reference in New Issue
Block a user