(rontolisp) docs

SICP Compatibility

Structure and Interpretation of Computer Programs (SICP), by Harold Abelson and Gerald Jay Sussman, is the MIT textbook these names come from, along with MIT Scheme, the dialect it was written for.

Not R7RS. MIT Scheme's true, false and nil (ordinary variables, not literals), user-initial-environment and system-global-environment (both naming the one global environment, see eval), list and number utilities such as filter, fold-left and 1+, runtime and random, parallel-execute and test-and-set!, and SICP's streams: cons-stream (syntax) and the stream procedures. Each has its own page under SICP Names; R5RS's scheme-report-environment, exact->inexact and inexact->exact are under (scheme r5rs). A stream is '() or a pair whose cdr is a promise, so the-empty-stream is '() and stream-null? is null?. These are visible only when a program has no (import ...) at all -- like the six libraries -- and no import names them, so an explicit import list leaves them unreachable. --scheme-standard r7rs hides them everywhere.

(#t #f () 4)
(1 3 5)
(((() . 1) . 2) . 3)

parallel-execute runs each thunk in its own thread on the interpreter and the JVM and returns once every one has finished; an error in a thunk is signaled then. WebAssembly has no threads, so there the thunks run one after another in argument order -- one of the interleavings a threaded run may produce, in which a serializer built on test-and-set! never has to wait. test-and-set! is atomic on every backend.

(#f #t)
(only)

A promise is forced once and remembers its value; walking a stream forces each cell once.

(2 3 5 7 11 13 17 19 23 29)
once (42 42)