Arrival language basics
Arrival language basics
Section titled “Arrival language basics”Arrival is a sandboxed R7RS-small Scheme implementation. It keeps Scheme’s familiar functional core, while omitting ambient I/O, continuations, and ordinary mutation. The examples below describe the language exposed by the current @inhuman.tools/arrival package.
Forms and values
Section titled “Forms and values”Programs are made of parenthesized forms. A call places its procedure first, followed by its arguments:
(+ 1 2) ; => 3A define binds a name in the current scope, and lambda creates a procedure:
(define (square x) (* x x))(square 5) ; => 25
(map (lambda (x) (* x x)) (list 1 2 3)) ; => (1 4 9)Booleans, strings, numbers, symbols, pairs/lists, and procedures are Scheme values. Numbers use an exact numeric tower where supported; for example, (+ (/ 1 3) (/ 2 3)) is exactly 1. Arithmetic that exceeds the supported safe-integer representation raises an error rather than silently becoming an inexact host number.
Lists and functional programming
Section titled “Lists and functional programming”The base includes R7RS forms and twelve assembled SRFIs (1, 2, 8, 13, 26, 28, 43, 95, 128, 151, 189, and 235). Common list operations such as map and filter can be composed without introducing side effects:
(filter (lambda (x) (> x 5)) (list 1 3 7 9 2)) ; => (7 9)Procedures support proper tail calls. The runtime can represent multiple values, though user-facing binders that unpack them are intentionally constrained. Exceptions follow the R7RS exception tower.
Additional reader forms
Section titled “Additional reader forms”Arrival also recognizes a measured set of familiar Lisp-family forms that canonicalize to the same underlying Scheme representation. For example, bracket vectors and map-style pipelines are supported:
[1 2 3] ; vector literal(->> (list 1 2 3) (map (lambda (x) (* x x))))These extra forms are not a separate dialect with different evaluation rules. Some familiar names that cannot be supported honestly are present as explanatory errors instead of silently behaving differently. The language reference in the repository documents the preferred forms and compatibility surface.
No ambient effects
Section titled “No ambient effects”There is no implicit filesystem, clock, random source, console, process, or require in a program. Effects enter through declared host capabilities, rather than ambient globals. This keeps programs sandboxed and lets external data have an explicit origin.
Learn more
Section titled “Learn more”- Source:
arrival/packages/arrival/README.md(The language; Membrane, provenance, uneval, seal; Polyglot by observation; IO taken away). - Syntax package:
arrival/packages/arrival-syntax/README.md. - Detailed language inventory:
arrival/packages/arrival/docs/llm-language-guide.md.