Skip to content

Instantly share code, notes, and snippets.

@sogaiu
Last active December 24, 2025 03:39
Show Gist options
  • Select an option

  • Save sogaiu/e4e3e1bddb875345b98c8581113604e2 to your computer and use it in GitHub Desktop.

Select an option

Save sogaiu/e4e3e1bddb875345b98c8581113604e2 to your computer and use it in GitHub Desktop.
$ cat sample.janet
(def a 1)
$ janet
Janet 1.40.1-7d672f43 linux/x64/gcc - '(doc)' for help
repl:1:> (import ./sample)
@{_ @{:value <cycle 0>} sample/a @{:private true}}
repl:2:> (import ./sample :export true)
@{_ @{:value <cycle 0>} sample/a @{:private false}}
$ cat sample.janet
(def a 1)
$ cat export.janet
(import ./sample :export true)
$ janet
Janet 1.40.1-7d672f43 linux/x64/gcc - '(doc)' for help
repl:1:> (import ./export)
@{_ @{:value <cycle 0>} export/sample/a @{:private true}}
$ cat sample.janet
(def a 1)
$ cat export.janet
(import ./sample :prefix "" :export true)
$ janet
Janet 1.40.1-7d672f43 linux/x64/gcc - '(doc)' for help
repl:1:> (import ./export)
@{_ @{:value <cycle 0>} export/a @{:private true}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment