tadeuzagallo / verve-lang

A functional language for the working hacker
https://verve-lang.org
MIT License
346 stars 7 forks source link

Add support for mutually recursive declarations #43

Open tadeuzagallo opened 7 years ago

tadeuzagallo commented 7 years ago
enum Nat {
  Z
  S(Nat)
}

fn even(x: Nat) -> Bool {
  match x {
    case Z: True
    case S(y): odd(y)
  }
}

fn odd(x: Nat) -> Bool {
  match x {
    case Z: False
    case S(y): even(y)
  }
}