Bau

1 program Added 2026-03-10T22:28:01Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: enabled Evidence Report issue View issues
Aliases: bau-lang
Provenance: commit bfcf1dbda8 · authored 2026-03-10T23:28:28+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

Bait (0.39)Bend (0.29)rk (0.28)S-lang (0.28)yr (0.28)

LLM-contributed programs

Fibonacci (recursive, iterative, and const)

Provenance: commit bfcf1dbda8 · authored 2026-03-10T23:28:28+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch enabled
code.bau · license: MIT · added: 2026-03-10T22:28:01Z
ticks := 0

fun fibonacciRecursive(n int) int
    ticks += 1
    if n < 2 
        return n
    return fibonacciRecursive(n - 1) + fibonacciRecursive(n - 2)

fun fibonacciIterative(n int) int
    r0 := 0
    r1 := 0
    r := 1
    for i := range(1, n)
        r1 = r0
        r0 = r
        r = r1 + r0
        ticks += 1
    return r

fun fibonacciConst(n int) const int
    r0 := 0
    r1 := 0
    r := 1
    for i := range(1, n)
        r1 = r0
        r0 = r
        r = r1 + r0
    return r

ticks = 0
println('fibonacci(20) recursive: ' fibonacciRecursive(20) ', ticks: ' ticks)
ticks = 0
println('fibonacci(20) iterative: ' fibonacciIterative(20) ', ticks: ' ticks)
ticks = 0
println('fibonacci(20) const:     ' fibonacciConst(20)     ', ticks: ' ticks)


## Expected
fibonacci(20) recursive: 6765, ticks: 21891
fibonacci(20) iterative: 6765, ticks: 19
fibonacci(20) const:     6765, ticks: 0

Contribute — propose a file extension

Tell us where to find evidence about Bau (mapped to pl/bau). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/Bau/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Battlethought Bauberqueue →