<?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>all(HashTable,Function) -- whether all key/value pairs in a hash table satisfy a specified condition</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="_ambient.html">next</a> | <a href="_all_lp__Basic__List_cm__Basic__List_cm__Function_rp.html">previous</a> | <a href="_ambient.html">forward</a> | <a href="_all_lp__Basic__List_cm__Basic__List_cm__Function_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>all(HashTable,Function) -- whether all key/value pairs in a hash table satisfy a specified condition</h1> <div class="single"><h2>Synopsis</h2> <ul><li><div class="list"><dl class="element"><dt class="heading">Usage: </dt><dd class="value"><div><tt>all(H,f)</tt></div> </dd></dl> </div> </li> <li><span>Function: <a href="_all.html" title="whether all elements satisfy a specified condition">all</a></span></li> <li><div class="single">Inputs:<ul><li><span><tt>H</tt>, <span>a <a href="___Hash__Table.html">hash table</a></span></span></li> <li><span><tt>f</tt>, <span>a <a href="___Function.html">function</a></span>, , which returns true or false</span></li> </ul> </div> </li> <li><div class="single">Outputs:<ul><li><span><span>a <a href="___Boolean.html">Boolean value</a></span>, <a href="_true.html" title="">true</a> if <tt>f</tt>returns true when applied to all key/value pairs of <tt>H</tt> and <a href="_false.html" title="">false</a> otherwise</span></li> </ul> </div> </li> </ul> </div> <div class="single"><h2>Description</h2> <div><table class="examples"><tr><td><pre>i1 : all(hashTable{1=>3, 2=>2, 3=>1}, (a,b) -> a == b) o1 = false</pre> </td></tr> <tr><td><pre>i2 : all(hashTable{1=>1, 2=>2, 3=>3}, (a,b) -> a == b) o2 = true</pre> </td></tr> </table> </div> </div> <div class="single"><h2>See also</h2> <ul><li><span><a href="_scan.html" title="apply a function to each element">scan</a> -- apply a function to each element</span></li> <li><span><a href="_apply.html" title="apply a function to each element">apply</a> -- apply a function to each element</span></li> <li><span><a href="_select.html" title="select from a list, hash table, or string">select</a> -- select from a list, hash table, or string</span></li> <li><span><a href="_any.html" title="whether any elements satisfy a specified condition">any</a> -- whether any elements satisfy a specified condition</span></li> <li><span><a href="_member.html" title="test membership in a list or set">member</a> -- test membership in a list or set</span></li> </ul> </div> </div> </body> </html>