Re: Where is the syntax error
| Newsgroups | gmane.comp.lang.ocaml.beginners |
|---|---|
| Message-ID | <[email protected]> |
Hi, > Actually, its semantics implies "at_least_one_nonzero"... but that is > another problem. You're right, "not_both_zero" is what I meant. And tangentially, using negatives in function names is often a recipe for confusion. I would rather name the function positively and negate its result where appropriate: let both_zero a b = a = 0 && b = 0 Cheers, Dario Teixeira