diff options
Diffstat (limited to 'lux-lua')
-rw-r--r-- | lux-lua/source/program.lux | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lux-lua/source/program.lux b/lux-lua/source/program.lux index 6c7719220..0bb73d348 100644 --- a/lux-lua/source/program.lux +++ b/lux-lua/source/program.lux @@ -561,8 +561,9 @@ (def: execute! run!) - (def: (define! context input) - (let [global (reference.artifact context) + (def: (define! context custom input) + (let [global (maybe.default (reference.artifact context) + custom) @global (_.var global)] (do try.monad [#let [definition (_.set (list @global) input)] @@ -573,10 +574,10 @@ (def: (ingest context content) (|> content (\ utf8.codec decode) try.assume (:as _.Statement))) - (def: (re_learn context content) + (def: (re_learn context custom content) (run! content)) - (def: (re_load context content) + (def: (re_load context custom content) (do try.monad [_ (run! content)] (run! (_.return (_.var (reference.artifact context))))))))])))) @@ -598,8 +599,9 @@ (def: execute! run!) - (def: (define! context input) - (let [global (reference.artifact context) + (def: (define! context custom input) + (let [global (maybe.default (reference.artifact context) + custom) @global (_.var global)] (do try.monad [#let [definition (_.set (list @global) input)] @@ -610,10 +612,10 @@ (def: (ingest context content) (|> content (\ utf8.codec decode) try.assume (:as _.Statement))) - (def: (re_learn context content) + (def: (re_learn context custom content) (run! content)) - (def: (re_load context content) + (def: (re_load context custom content) (do try.monad [_ (run! content)] (run! (_.return (_.var (reference.artifact context))))))))))))}) |