We need to check for determinism, meaning that the matches must not have intersecting pattern.
let rec choice(n) = match n with
| Nil -> Eps
| Cons(a,m) -> match m with
| Nil -> a
| Cons(b,bs) -> choice(m)
| Cons(b,bs) -> a (* non determinism*)
this should be rejected
We need to check for determinism, meaning that the matches must not have intersecting pattern.
this should be rejected