-
Notifications
You must be signed in to change notification settings - Fork 3
Keyword: import
Pebaz edited this page May 29, 2019
·
2 revisions
Imports any LambdaCore file. Can be an absolute path or a relative path. Relative paths are relative to the directory that LambdaCore was run from.
Imported files are run and their symbol table appended to the current symbol table.
(import "examples/calc.lcore")
(import "../../../some.lcore")
(import "C:/Program Files/SOME-FOLDER/hello.lcore")
:: hi.lcore
(defn 'hello [] '[
(print "HELLO")
])
:: Some-other-file.lcore
(loop 'i 3 '[
(import "hi.lcore")
(hello) :: Prints "HELLO" each iteration
])
(hello) :: No longer in scope.