Rather (in this case): let a = List.map fst (List.filter (fun x -> snd x) [(out, o); (value, v)]) That seems reasonable. On Fri, Jan 20, 2012 at 09:52, Lin wrote: > What about: > > let a = List.filter (fun x -> x) [out; value] > > Lin > > > > On 01/20/2012 02:38 PM, Martin DeMello 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 > >