<?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="Option type - Page 10 - Wikipedia">
<p>
<a accesskey="1" href="page.php?w=option_type&amp;p=9">1.Previous</a><br />
<a accesskey="3" href="page.php?w=option_type&amp;p=11">3.Next</a>
</p>

<p>int main(int argc, char* argv[]) {    readDivisionResults(1, 5);    readDivisionResults(8, 0);} </p>

<p>In <a href="page.php?w=C%2B%2B23">C++23</a>, support for monadic operations for  is avaliable.</p>

<p><big> Elm </big></p>
<p>In Elm, the option type is defined as .</p>

<p><big> F# </big></p>
<p>In F#, the option type is defined as .</p>

<p><syntaxhighlight lang="fsharp">let showValue =    Option.fold (fun _ x -> sprintf "The value is: %d" x) "No value"</syntaxhighlight></p>

<p>let full = Some 42let empty = None</p>

<p>showValue full |> printfn "showValue</p><p>
<a accesskey="1" href="page.php?w=option_type&amp;p=9">1.Previous</a><br />
<a accesskey="3" href="page.php?w=option_type&amp;p=11">3.Next</a>
</p>

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

</card>
</wml>
