Arc Forumnew | comments | leaders | submitlogin
1 point by akkartik 4891 days ago | link | parent

Perhaps you should complete the first line of code ^_^


1 point by rocketnia 4891 days ago | link

Lol, apparently this is a case where a visual example doesn't explain much of anything.

That first line is kind of an implementation detail for now. The code that initializes the REPL is here: https://github.com/rocketnia/rainbow-js/commit/10a171557ef65...

It uses an "e" option in its call to Console.mainAsync(). This corresponds to Java Rainbow's -e command line parameter, and it takes an Array of strings, each string containing a single Arc command to evaluate. The results are printed as part of the initial output, the part before the first prompt shown.

The first Arc command passed into "e" is (assign load-from-web (fn ...)), which results in the big (fn ...) at the beginning of the output.

The second, which is only passed in when auto-loading the libraries, is (load-from-web), and that performs all the libraries' own side effects (visible as the "* redefining..." lines) and finally results in nil.

-----