JanetDocsPlaygroundI'm feeling luckyGitHub sign in

merge-module



    function
    boot.janet on line 2911, column 1

    (merge-module target source &opt prefix export)

    Merge a module source into the `target` environment with a 
    `prefix`, as with the `import` macro. This lets users emulate the 
    behavior of `import` with a custom module table. If `export` is 
    truthy, then merged functions are not marked as private. Returns 
    the modified target environment.


1 exampleSign in to add an example
Loading...
# To resume an image's environment:

# With this example image:
# echo "(def a 1)" > test.janet
# janet -c test.janet test.jimage
# Now open the REPL:

# Enter an image, for continued development or exploration
(merge-module (curenv) (load-image (slurp "test.jimage")) "" true)
veqqqPlayground