Karl Playground [Experimental]
Run ▶
Quickstart
Language + Concurrency
Functions + List Ops
Ranges + Slices
For Expression + Then Block
Match with Guards
Maps, Sets, Objects
Recover Operator (?)
Tasks + then()
Join Group (& { ... })
Channels Stream
Auto Run
Loading WASM environment...
// Welcome to Karl Playground // Karl is a functional-first language. // Define a function let add = (a, b) -> a + b // Use list operations let nums = [1, 2, 3, 4, 5] let squares = nums.map((x) -> x * x) log("Squares:", squares) sleep(1500) // Sleep for 1.5 seconds (non-blocking in worker) log("Sum of squares:", squares.reduce(add, 0)) // Example of concurrency let c = channel() spawn((ch) -> { ch.send("Hello from thread!") })(c) log(c.recv()) // Returns ["Hello from thread!", false] (value, is_closed)