<?xml version="1.0" encoding='utf-8'?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" title="Caml - Page 11 - Wikipedia">
<p>
<a accesskey="1" href="page.php?w=Caml&amp;p=10">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Caml&amp;p=12">3.Next</a>
</p>
<p>example:<syntaxhighlight lang=OCaml>  # haar [1; 2; 3; 4; -4; -3; -2; -1];;   - : int list = [0; 20; 4; 4; -1; -1; -1; -1]</syntaxhighlight>Pattern matching allows complicated transformations to be represented clearly and succinctly. Moreover, the Caml compiler turns pattern matches into very efficient code, at times resulting in programs that are shorter and faster than equivalent code written with a case statement (Cardelli 1984, p.&nbsp;210.).</p>

<p><big>History</big></p>
<p>The first Caml implementation was written in <a href="page.php?w=Lisp_%28programming_language%29">Lisp</a></p><p>
<a accesskey="1" href="page.php?w=Caml&amp;p=10">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Caml&amp;p=12">3.Next</a>
</p>

<do type="prev" label="Search">
        <go href="search.wml"/>
</do>

</card>
</wml>
