On 01/20/2012 09:12 AM, David Allsopp wrote:
Maybe for this case with two variables, yes - but it can't do that 
indefinitely: as the number of variables increases, the code size increases 
exponentially.

true, the right way to generalize this is to use vuillion's `maybe` function that prepends conditionally. My main point is that the original match statement is not bad in efficiency, and does, in fact, run 35% faster for the 2-variable case.

E.

--
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

Reply via email to