Live in your browser

Krypton Playground

Write Krypton, hit Run, see output — no install, no signup. The full lang subset that runs in-browser today.

Tip: edit the code below. Drop in your own functions, try the stdlib helpers (kp, len, listNew, mapNew, htmk, kcss). Lessons covering match/struct/try, file I/O, HTTP, JSON need the real local kcc — try kcc -r yourfile.k.

// Welcome to the Krypton playground.
// Edit the code below and hit Run.

func fib(n) {
    if n <= 1 { emit n }
    emit fib(n - 1) + fib(n - 2)
}

just run {
    let i = 0
    while i < 10 {
        kp("fib(" + i + ") = " + fib(i))
        i = i + 1
    }
}
Click ▶ Run to execute.

Want guided lessons instead? Start at Learn Krypton.