verve-lang icon indicating copy to clipboard operation
verve-lang copied to clipboard

Add support for mutually recursive declarations

Open tadeuzagallo opened this issue 7 years ago • 0 comments

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)
  }
}

tadeuzagallo avatar Sep 15 '17 07:09 tadeuzagallo