application/octet-stream
•
624 B
•
26 lines
[def help]
[let []
[def iter [λ [l]
[cond [[nil? l] #t]
[#t [display [describe [car l]]] [newline] [iter [cdr l]]
]]
]]
[set! help [λ [i]
"Describe 10 functions at offset 1"
[let [[off [* [int i] 10]]]
[iter [map cat [symbol-table off 10]]]
[display [cat "Help page " [int i] " of " [/ [symbol-count] 10]]] [newline] #t]
]]
]
[def repl-prompt #nil]
[let [[repl-count -1]]
[set! repl-prompt [λ [i]
"Display the REPL prompt"
[set! repl-count [++ repl-count]]
[display [cat "[" repl-count "]" [ansi-fg 1] "λ" [ansi-fg 12] ">" [ansi-reset] " "]]
]]
]
[def test-context "Nujel Standalone"]