Skip to content

NymphProgramming Language

A simple language that gets out of your way.

nym
func main() -> {
  println("Hello world!")
}
nym
func factorial(n: int) -> match (n) {
  ..=1 -> 1
  _ -> n * factorial(n - 1)
}
nym
enum BinaryTree<T> {
  Leaf(value: T),
  Node(left: BinaryTree<T>, right: BinaryTree<T>),
}
nym
let nums = #[1, 2, 3]

nums
  .filter(_ % 2 == 1)
  .map(_ ** 2)
  .fold(0, (x, y) -> x + y)
  |> println // 10