Kestrel is a pure, strongly typed functional language that compiles to js.
// Type is inferred as `Fn(Int) -> String`
pub let fizz_buzz = fn n {
match (n % 3, n % 5) {
(0, 0) => "FizzBuzz",
(0, _) => "Fizz",
(_, 0) => "Buzz",
_ => String.from_int(n),
}
}
Take a look at the language tour to learn more. You can find some examples by looking at the standard library implementation
You can try kestrel without installing it on the online playground.
Install the kestrel
cli using npm:
npm install -g kestrel-lang
Lsp integration is available as a vscode extension.