Comment Comment by gottlobflegel Notice from the definition of `Term`enum Term { Bool(bool), Not(Box<Term>), ... }that your code simply does not typecheck. `Not` expects a `Box<Term>`, not a `Value`.It's also worth noting that one would probably want to consider something likeNot(Not(Bool(true)))a valid term, which your implementation wouldn't. parent gottlobflegel 3 years ago
enum Term { Bool(bool), Not(Box<Term>), ... }
that your code simply does not typecheck. `Not` expects a `Box<Term>`, not a `Value`.
It's also worth noting that one would probably want to consider something like
Not(Not(Bool(true)))
a valid term, which your implementation wouldn't.