Skip to content

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.

Programs are made of parenthesized forms. A call places its procedure first, followed by its arguments:

(+ 1 2) ; => 3

A 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.

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.

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.

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.

  • 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.