123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <html lang="en">
- <head>
- <title>Distribute - avram - a virtual machine code interpreter</title>
- <meta http-equiv="Content-Type" content="text/html">
- <meta name="description" content="avram - a virtual machine code interpreter">
- <meta name="generator" content="makeinfo 4.13">
- <link title="Top" rel="start" href="index.html#Top">
- <link rel="up" href="List-Functions.html#List-Functions" title="List Functions">
- <link rel="prev" href="Reverse.html#Reverse" title="Reverse">
- <link rel="next" href="Transpose.html#Transpose" title="Transpose">
- <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
- <meta http-equiv="Content-Style-Type" content="text/css">
- <style type="text/css"><!--
- pre.display { font-family:inherit }
- pre.format { font-family:inherit }
- pre.smalldisplay { font-family:inherit; font-size:smaller }
- pre.smallformat { font-family:inherit; font-size:smaller }
- pre.smallexample { font-size:smaller }
- pre.smalllisp { font-size:smaller }
- span.sc { font-variant:small-caps }
- span.roman { font-family:serif; font-weight:normal; }
- span.sansserif { font-family:sans-serif; font-weight:normal; }
- --></style>
- </head>
- <body>
- <div class="node">
- <a name="Distribute"></a>
- <p>
- Next: <a rel="next" accesskey="n" href="Transpose.html#Transpose">Transpose</a>,
- Previous: <a rel="previous" accesskey="p" href="Reverse.html#Reverse">Reverse</a>,
- Up: <a rel="up" accesskey="u" href="List-Functions.html#List-Functions">List Functions</a>
- <hr>
- </div>
- <h5 class="subsubsection">2.7.14.3 Distribute</h5>
- <p>The function with the following virtual code representation is
- frequently useful for manipulating lists.
- <a name="index-g_t_0040code_007bdistribute_007d-345"></a>
- <dl>
- <dt><em>T30</em><dd><code>distribute</code> = <code>(((nil,nil),nil),nil)</code>
- </dl>
- <p class="noindent">This function takes a pair whose right side represents a list, and
- returns a list of pairs, with one pair for each item in the list. The
- left side of each pair is the left side of the original argument, and
- the right side is the corresponding item of the list. A semantics for
- this operation is specified by the following properties.
- <dl>
- <dt><em>P39</em><dd>[[<code>distribute</code>]] <code>(</code><var>x</var><code>,nil)</code> = <code>nil</code>
- <br><dt><em>P40</em><dd>[[<code>distribute</code>]] <code>(</code><var>x</var><code>,(</code><var>y</var><code>,</code><var>z</var><code>))</code> =
- <code>((</code><var>x</var><code>,</code><var>y</var><code>),</code>[[<code>distribute</code>]] <code>(</code><var>x</var><code>,</code><var>z</var><code>))</code>
- </dl>
- </body></html>
|