
19 Apr
2007
19 Apr
'07
9:19 a.m.
Joel Reymont wrote:
This is what want. Notice the succinctness.
# let infer = function | A | B | C -> true; | D | E | F -> false;; val infer : foo -> bool = <fun>
Yes, I appreciate what you want, and I know ocaml too :) I was just talking around the other ways you can achieve it. I don't know if there is a strong reason why haskell doesn't support an equivalent syntax. I'd guess something like: f A = B = C = true f D = E = F = false or perhaps f A = f B = f C = true f D = f E = f F = false Jules