Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 486 Bytes

README.md

File metadata and controls

28 lines (21 loc) · 486 Bytes

Frost ❄️

Frost is a small programming language, made after working through "Writing an Interpreter in Go".

REPL

cargo run --release

Example

> let x = 5;
> let b = x + 5 * 3;
> b
20
> let add = fn(a, b, c, d) { return a + b + c + d };
> add(1, 2, 3, 4);
10
> let factorial = fn(n) { if (n == 0) { 1 } else { n * factorial(n - 1) } };
> factorial(5)
120

License

MIT