<?xml version="1.0" encoding="utf-8" ?> <!-- for emacs: -*- coding: utf-8 -*- --> <!-- Apache may like this line in the file .htaccess: AddCharset utf-8 .html --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head><title>Option -- the class of all pairs x => y</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="_optional_spargument_spdocumentation_sptemplate.html">next</a> | <a href="_open__Out__Append_lp__String_rp.html">previous</a> | <a href="_optional_spargument_spdocumentation_sptemplate.html">forward</a> | <a href="_open__Out__Append_lp__String_rp.html">backward</a> | up | <a href="index.html">top</a> | <a href="master.html">index</a> | <a href="toc.html">toc</a> | <a href="http://www.math.uiuc.edu/Macaulay2/">Macaulay2 web site</a></div> </td> </tr> </table> <hr/> <div><h1>Option -- the class of all pairs x => y</h1> <div class="single"><h2>Description</h2> <div><p/> Such pairs are used as optional arguments for functions. There is also a way to make new hash tables with <a href="_new.html" title="new objects and new types">new</a> by providing a list of option pairs.<p/> <table class="examples"><tr><td><pre>i1 : a => 5 o1 = a => 5 o1 : Option</pre> </td></tr> <tr><td><pre>i2 : peek (a => 5) o2 = Option{a, 5}</pre> </td></tr> <tr><td><pre>i3 : new HashTable from {a => 5, b => 7} o3 = HashTable{a => 5} b => 7 o3 : HashTable</pre> </td></tr> </table> <p/> These pairs are implemented as lists, so that if <tt>z</tt> is <tt>x => y</tt>, then <tt>x</tt> is <tt>z#0</tt> and <tt>y</tt> is <tt>z#1</tt>.<p/> </div> </div> <div class="single"><h2>See also</h2> <ul><li><span><a href="__eq_gt.html" title="produce an Option">=></a> -- produce an Option</span></li> </ul> </div> <div class="waystouse"><h2>Functions and methods returning an option :</h2> <ul><li><span>Thing => Thing, see <span><a href="__eq_gt.html" title="produce an Option">=></a> -- produce an Option</span></span></li> </ul> <h2>Methods that use an option :</h2> <ul><li><span>directSum(Option), see <span><a href="_direct__Sum.html" title="direct sum of modules or maps">directSum</a> -- direct sum of modules or maps</span></span></li> <li><span>Option ++ Option, see <span><a href="_direct__Sum.html" title="direct sum of modules or maps">directSum</a> -- direct sum of modules or maps</span></span></li> <li><span>installAssignmentMethod(Symbol,HashTable,HashTable,Option), see <span><a href="_install__Assignment__Method.html" title="install methods assignment to the value of an operator">installAssignmentMethod</a> -- install methods assignment to the value of an operator</span></span></li> <li><span>installAssignmentMethod(Symbol,HashTable,Option), see <span><a href="_install__Assignment__Method.html" title="install methods assignment to the value of an operator">installAssignmentMethod</a> -- install methods assignment to the value of an operator</span></span></li> <li><span>substitute(Ideal,Option), see <span><a href="_substitute.html" title="substituting values for variables">substitute</a> -- substituting values for variables</span></span></li> <li><span>substitute(Matrix,Option), see <span><a href="_substitute.html" title="substituting values for variables">substitute</a> -- substituting values for variables</span></span></li> <li><span>substitute(Module,Option), see <span><a href="_substitute.html" title="substituting values for variables">substitute</a> -- substituting values for variables</span></span></li> <li><span>substitute(RingElement,Option), see <span><a href="_substitute.html" title="substituting values for variables">substitute</a> -- substituting values for variables</span></span></li> <li><span>substitute(Vector,Option), see <span><a href="_substitute.html" title="substituting values for variables">substitute</a> -- substituting values for variables</span></span></li> </ul> </div> <div class="waystouse"><h2>For the programmer</h2> <p>The object <a href="___Option.html" title="the class of all pairs x => y">Option</a> is <span>a <a href="___Type.html">type</a></span>, with ancestor classes <a href="___Basic__List.html" title="the class of all basic lists">BasicList</a> < <a href="___Thing.html" title="the class of all things">Thing</a>.</p> </div> </div> </body> </html>