Lambda Script is a functional scripting language and runtime engine that parses, validates, queries, transforms, and renders all your data.
// Map: double each element
[1, 2, 3] | ~ * 2 // [2, 4, 6]
// Extract fields from a collection
users | ~.name // ["Alice", "Bob", "Carol"]
// Filter with 'that'
[1, 2, 3, 4, 5] that ~ > 3 // [4, 5]
// Chain: filter → map → aggregate
users that ~.age >= 18 | ~.name | len // count adult names
// Vector arithmetic broadcasts automatically
[1, 2, 3] + 10 // [11, 12, 13]
[1, 2] * [3, 4] // [3, 8]
// First-class markup syntax
let card = <div class: "card"
<h2 "Hello World">
<p "Lambda treats documents as data.">
>
// Render to HTML string
format(card, 'html')
// Parse any format into a unified tree
let doc = input("readme.md", 'markdown')
let data = input("config.yaml", 'yaml')
// Query the tree
doc?<img> // all images in document
doc?<a href: string> // all links with href
// Type annotations
let x: int = 42
let items: [string] = ["a", "b"]
// Union and optional types
type Result = int | error
type Name = string?
// Object types with methods
type Point {
x: float, y: float;
fn distance(other: Point) =>
math.sqrt((x - other.x)**2 + (y - other.y)**2)
}
// Element type patterns for document schemas
type Link = <a href: string; string>
type Article = <article title: string; string, Section*>
// Filter and transform with for-expressions
for (x in data where x > 0) x * 2
// With local bindings
for (x in data, let sq = x * x where sq > 10) sq
// Sorting and pagination
for (x in items order by x.price desc limit 5) x.name
// Grouping and aggregation
for (u in users where u.active
order by u.age desc
limit 10 offset 5)
{name: u.name, age: u.age}
fn describe(x) => match x {
case null: "nothing"
case 0: "zero"
case 1 to 9: "small number"
case int that (~ > 9): "big number"
case string: "text: " ++ ~
case [int]: "int array"
default: "something else"
}
// Query operator — like jQuery for data trees
html?<img> // all images
html?<div class: string> // divs with class
data?{status: "ok"} // maps with status=="ok"
Replace stitched-together toolchains with a single, expressive functional language that treats documents as data.
Immutable data, first-class functions and types, expressive pipe operator for fluent data transformation pipelines.
MIR-based JIT compilation delivers near-native speed. Competitive with Node.js V8, 13× faster than CPython.
Parse Markdown, HTML, JSON, YAML, LaTeX, PDF, XML, CSV, TOML, and more into a unified node tree representation.
Rich type system with schema-based validation for structured data and document trees, including element schemas for HTML/XML.
Built-in Radiant HTML/CSS engine with block, inline, flex, grid, and table layout. Render to SVG, PDF, PNG, or JPEG.
Open HTML, Markdown, LaTeX, SVG, PDF, diagrams, and Lambda scripts in a native viewer with lambda view.
Benchmarked across 56 standard benchmarks (R7RS, AWFY, BENG, KOSTYA, LARCENY, JetStream).
| vs. Engine | Geo. Mean Ratio | Lambda Wins | Total |
|---|---|---|---|
| Node.js (V8) | 1.05× | 28 | 56 |
| QuickJS | 0.12× (8× faster) | 49 | 53 |
| CPython 3.13 | 0.08× (13× faster) | 47 | 55 |
Ratio < 1.0 = Lambda is faster. Excels on micro-benchmarks, tight numeric loops, and recursive workloads.
Convert between Markdown, HTML, JSON, YAML, LaTeX, XML, PDF, and 15+ other formats with a single command.
ValidationValidate JSON, YAML, XML, and HTML documents against Lambda schemas with detailed error reporting.
RenderingRender HTML, LaTeX, Mermaid, D2, and GraphViz to SVG, PDF, PNG, or JPEG with the Radiant engine.
DataFluent pipe-based data transformation with vector arithmetic, SQL-like queries, and pattern matching.
DocumentFirst-class markup literals for generating HTML, XML, and structured documents programmatically.
ViewerOpen any supported format in a native viewer window — HTML, Markdown, LaTeX, SVG, PDF, diagrams, and more.
Download the binary, unzip, and run.