AILANG Playground
Try AILANG right in your browser! This REPL runs entirely client-side using WebAssembly - no server required.
Loading AILANG REPL...
Quick Examples
Basic Arithmetic
1 + 2
10 * 5
42.0 / 2.0
Lambda Functions
AILANG is a functional language at heart:
(\x. x * 2)(21)
Let Bindings
Define and use variables:
let double = \x. x * 2 in double(21)
Higher-Order Functions
Compose and apply functions:
let double = \x. x * 2 in
let triple = \x. x * 3 in
double(5) + triple(4)
Type Inference
Check the type of any expression:
:type \x. \y. x + y
Pattern Matching
Work with tuples:
let first = \pair. match pair with | (a, b) -> a in first((1, 2))
REPL Commands
| Command | Description |
|---|---|
:help | Show all available commands |
:type <expr> | Display the type of an expression |
:instances | Show available type class instances |
:reset | Clear the environment and start fresh |
Learn More
- Getting Started - Install AILANG locally for full functionality
- Language Reference - Complete syntax reference
- Examples - Browse 60+ working examples
- Benchmarks - See AI code generation metrics
Technical Details
This playground is powered by:
- WebAssembly: The full AILANG interpreter compiled to WASM (~13 MB, ~3 MB compressed)
- Go: Core language implementation (GOOS=js GOARCH=wasm)
- React: UI component framework
The WASM binary is rebuilt automatically on every release via GitHub Actions.
Browser limitations:
- Module imports work (
:import std/preludeauto-loaded) - File I/O and network effects disabled for security
- Use local installation for full effect system
Found a Bug?
If you encounter issues with the playground, please report them on GitHub.