λ Mini-ML CRDT Editor

Collaborative real-time editor with live evaluation

Loading JavaScript...

Network Collaboration (Beta)

Not connected

Connect to collaborate with other peers in real-time. Make sure the signaling server is running:

node examples/web/signaling-server.js

Mini-ML Syntax

Definitions

let x = 42
let double = \x. { x + x }
let result = double 5
result

Functions & Application

let inc = \x. { x + 1 }
let twice = \f. \x. {
  f (f x)
}
let result = twice inc 0
result

Conditionals

let choose = \x. if x then {
  x + 1
} else {
  42
}
let result = choose 5
result

Grammar (EBNF)

Module       ::= (LetDef '\n')* Expression
LetDef       ::= 'let' Identifier '=' Expression
Expression   ::= BinaryOp
BinaryOp     ::= Application (('+' | '-') Application)*
Application  ::= Atom+
Atom         ::= Integer | Variable | Lambda
               | IfThenElse | '(' Expression ')'
Lambda       ::= ('λ' | '\') Identifier '.' Expression
IfThenElse   ::= 'if' Expression 'then' Expression 'else' Expression
Examples:

AST Visualization

Waiting for input...

AST Structure & Parse Errors

Structure

Waiting for input...

Errors

  • No errors