Compiler in Rust (lexer, parser, checker, C codegen), maps, chars, dino fmt, dino lsp (diagnostics, formatting, outline, definition, hover, completion, signature help), docs, examples, VS Code/Vim files. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
13 lines
180 B
Plaintext
13 lines
180 B
Plaintext
func fib(n: int): int {
|
|
if n < 2 {
|
|
return n
|
|
}
|
|
return fib(n - 1) + fib(n - 2)
|
|
}
|
|
|
|
func main() {
|
|
for i in 0..15 {
|
|
print("fib({i}) = {fib(i)}")
|
|
}
|
|
}
|