plum

#treesitter#compiler#wasm

git clone https://git.pyrossh.dev/plum

A statically typed, imperative programming language inspired by rust, python


plum-examples/testing.plum
import std/Str
import std/Bool
import std/Number

fun add(a: Int, b: Int) -> Int =
  a + b

fun isEven(n: Int) -> Bool =
  n % 2 == 0

test "add works"
  assert add(1, 2) == 3
  assert add(2, 2) == 4

test "isEven works"
  assert isEven(4)
  assert !isEven(3)
  assert isEven(2)