1
0
mirror of https://github.com/janet-lang/janet synced 2025-01-12 16:40:27 +00:00

Add docstring for make-env

This commit is contained in:
Calvin Rose 2018-12-15 23:22:51 -05:00
parent 8a5ede21f7
commit e286e82144

View File

@ -1236,6 +1236,9 @@ value, one key will be ignored."
###
(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 &]
(def parent (if parent parent _env))
(def newenv (table/setproto @{} parent))