mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
236 lines
4.5 KiB
HTML
236 lines
4.5 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
|
<head>
|
|
<title>lyaml 6.2.8 Reference</title>
|
|
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
|
|
</head>
|
|
<body>
|
|
|
|
<div id="container">
|
|
|
|
<div id="product">
|
|
<div id="product_logo"></div>
|
|
<div id="product_name"><big><b></b></big></div>
|
|
<div id="product_description"></div>
|
|
</div> <!-- id="product" -->
|
|
|
|
|
|
<div id="main">
|
|
|
|
|
|
<!-- Menu -->
|
|
|
|
<div id="navigation">
|
|
<br/>
|
|
<h1>lyaml 6.2.8</h1>
|
|
|
|
<ul>
|
|
<li><a href="../index.html">Index</a></li>
|
|
</ul>
|
|
|
|
<h2>Contents</h2>
|
|
<ul>
|
|
<li><a href="#Functions">Functions</a></li>
|
|
<li><a href="#Tables">Tables</a></li>
|
|
</ul>
|
|
|
|
|
|
<h2>Modules</h2>
|
|
<ul class="nowrap">
|
|
<li><a href="../modules/lyaml.html">lyaml</a></li>
|
|
<li><a href="../modules/lyaml.explicit.html">lyaml.explicit</a></li>
|
|
<li><strong>lyaml.functional</strong></li>
|
|
<li><a href="../modules/lyaml.implicit.html">lyaml.implicit</a></li>
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div id="content">
|
|
|
|
<h1>Module <code>lyaml.functional</code></h1>
|
|
<p>
|
|
|
|
</p>
|
|
<p>
|
|
|
|
</p>
|
|
|
|
|
|
<h2><a href="#Functions">Functions</a></h2>
|
|
<table class="function_list">
|
|
<tr>
|
|
<td class="name" nowrap><a href="#isnull">isnull (x)</a></td>
|
|
<td class="summary"><code>lyaml.null</code> predicate.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#iscallable">iscallable (x)</a></td>
|
|
<td class="summary">Callable predicate.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#anyof">anyof (fns)</a></td>
|
|
<td class="summary">Compose a function to try each callable with supplied args.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap><a href="#id">id (...)</a></td>
|
|
<td class="summary">Return arguments unchanged.</td>
|
|
</tr>
|
|
</table>
|
|
<h2><a href="#Tables">Tables</a></h2>
|
|
<table class="function_list">
|
|
<tr>
|
|
<td class="name" nowrap><a href="#NULL">NULL</a></td>
|
|
<td class="summary"><code>lyaml.null</code> value.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br/>
|
|
<br/>
|
|
|
|
|
|
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
|
|
|
|
<dl class="function">
|
|
<dt>
|
|
<a name = "isnull"></a>
|
|
<strong>isnull (x)</strong>
|
|
</dt>
|
|
<dd>
|
|
<code>lyaml.null</code> predicate.
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">x</span>
|
|
operand
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">bool</span></span>
|
|
<code>true</code> if <em>x</em> is <code>lyaml.null</code>.
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "iscallable"></a>
|
|
<strong>iscallable (x)</strong>
|
|
</dt>
|
|
<dd>
|
|
Callable predicate.
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">x</span>
|
|
operand
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">bool</span></span>
|
|
<code>true</code> if <em>x</em> is a function has a __call metamethod
|
|
</ol>
|
|
|
|
|
|
|
|
<h3>Usage:</h3>
|
|
<ul>
|
|
<pre class="example">r = iscallable(x) <span class="keyword">and</span> x(...)</pre>
|
|
</ul>
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "anyof"></a>
|
|
<strong>anyof (fns)</strong>
|
|
</dt>
|
|
<dd>
|
|
Compose a function to try each callable with supplied args.
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">fns</span>
|
|
<span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
|
|
list of functions to try
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<span class="types"><span class="type">function</span></span>
|
|
|
|
<p>a new function to call <em>...</em> functions, stopping</p>
|
|
<pre><code>and returning the first non-nil result, if any
|
|
</code></pre>
|
|
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
<dt>
|
|
<a name = "id"></a>
|
|
<strong>id (...)</strong>
|
|
</dt>
|
|
<dd>
|
|
Return arguments unchanged.
|
|
|
|
|
|
<h3>Parameters:</h3>
|
|
<ul>
|
|
<li><span class="parameter">...</span>
|
|
arguments
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>Returns:</h3>
|
|
<ol>
|
|
|
|
<em>...</em>
|
|
</ol>
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<h2 class="section-header "><a name="Tables"></a>Tables</h2>
|
|
|
|
<dl class="function">
|
|
<dt>
|
|
<a name = "NULL"></a>
|
|
<strong>NULL</strong>
|
|
</dt>
|
|
<dd>
|
|
<code>lyaml.null</code> value.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
</div> <!-- id="content" -->
|
|
</div> <!-- id="main" -->
|
|
<div id="about">
|
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
|
|
<i style="float:right;">Last updated 2022-10-22 17:12:03 </i>
|
|
</div> <!-- id="about" -->
|
|
</div> <!-- id="container" -->
|
|
</body>
|
|
</html>
|