Skip to content

Arrival language basics

Arrival is a sandboxed R7RS-small Scheme implementation. It keeps Scheme’s functional core and omits ambient I/O, continuations, and ordinary mutation. The examples describe the language the current @inhuman.tools/arrival package exposes.

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

(+ 1 2) ; => 3

define binds a name in the current scope. 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. (+ (/ 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 compose without 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. User-facing binders that unpack them are intentionally constrained. Exceptions follow the R7RS exception tower.

Arrival also recognizes a limited set of Lisp-family forms that canonicalize to the same underlying Scheme representation. For example, it supports bracket vectors and map-style pipelines:

[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 Arrival cannot support faithfully are defined as explanatory errors instead of silently behaving differently. The language reference in the repository documents the preferred forms and compatibility surface.

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

A program has no implicit filesystem, clock, random source, console, process, or require. Effects enter through declared host capabilities, not ambient globals. This keeps programs sandboxed and gives external data an explicit origin.