I guess you can write it like:

let a = (if out then [o] else []) @ (if value then [v] else [])

But it's not particularly more pleasant to the eye.
Still it reduces the exponential explosion of the code, at a small additional cost (the @), I believe.

On Fri, Jan 20, 2012 at 07:38, Martin DeMello <martindemello@gmail.com> wrote:
     let a = match (out, value) with
       (true, true)  -> [o; v]
     | (false, true) -> [v]
     | (true, false) -> [o]
     | (false, false) -> []

--
Caml-list mailing list.  Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs