Initial revision
Annotate for file docs/html/subseq-template-class.html
2004-11-17 mantoniotti 1 <html>
22:19:54 ' 2 <head>
' 3 <title>CL Unification: Class SUBSEQ-TEMPLATE</title>
' 4 <link rel="stylesheet" href="main.css">
' 5 </head>
' 6
' 7 <body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0" bgcolor="#ffffff">
' 8
' 9 <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%" vspace="0" hspace="0">
' 10 <tr>
' 11 <td colspan="3">
' 12 <div class="header"
' 13 style="font-family:=Verdana,Arial,Helvetica; font-size: 18px; color: #41286f;">
' 14 <strong><i>CL Unification: Class SUBSEQ-TEMPLATE</title></i></strong>
' 15 <div class="navigation">
' 16 <a href="index.html" class="navigation-link">Home</a>
' 17 | <a href="unification-package.html" class="navigation-link">Previous</a>
' 18 | <a href="index.html" class="navigation-link">Next</a>
' 19 | <a href="downloads.html" class="navigation-link">Downloads</a>
' 20 | <a href="links.html" class="navigation-link">Links</a>
' 21 </div>
' 22 </div>
' 23 <div class="black-line"><img src="images/shim.gif" height="1" width="1"></div>
' 24 <div class="middle-bar"><img src="images/shim.gif" height="5" width="1"></div>
' 25 <div class="black-line"><img src="images/shim.gif" height="1" width="1"></div>
' 26 </td>
' 27 </tr>
' 28
' 29 <tr height="100%">
' 30 <td height="100%">&nbsp;</td>
' 31 <td valign="top" width="80%" height="100%">
' 32
' 33 <div class="content">
' 34 <div class="text" style="padding-top: 10px;">
' 35
' 36 <h1><i>Class</i> <strong>SUBSEQ-TEMPLATE</strong></h1>
' 37
' 38 <h2>Package:</h2>
' 39
' 40 <p><code>COMMON-LISP.EXTENSIONS.DATA-AND-CONTROL-FLOW.UNIFICATION</code></p>
' 41
' 42
' 43 <h2>Class Precedence List:</h2>
' 44
' 45 <p>
' 46 SUBSEQ-TEMPLATE, ELEMENT-TEMPLATE, EXPRESSION-TEMPLATE, TEMPLATE, STANDARD-OBJECT, T.
' 47 </p>
' 48
' 49 <h2>Known Subclasses:</h2>
' 50
' 51 <p>
' 52 None.
' 53 </p>
' 54
' 55
' 56 <h2>Slots:</h2>
' 57
' 58 <p>None.</p>
' 59
' 60
' 61 <h2>Description:</h2>
' 62
' 63 <p>The SUBSEQ-TEMPLATE class denotes those object that are used
' 64 to unify against a particular element of an ARRAY.</p>
' 65
' 66 <h3>Template Syntax:</h3>
' 67
' 68 <p>
' 69 <pre>
' 70 #T(<b>subseq</b> <i>start</i> <i>end</i> . <i>&lt;destructuring template lambda list&gt;</i>)
' 71 </pre>
' 72 </p>
' 73
' 74
' 75 <p>The SUBSEQ-TEMPLATE syntax is used to unify the elements of a
' 76 SEQUENCE starting from <i>start</i> and below <i>end</i>, against
' 77 the <i>&lt;destructuring template lambda list&gt;</i>.</p>
' 78
' 79 <p><i>start</i> and <i>end</i> must be supplied and must be valid
' 80 sequence indexes, i.e. most likely, FIXNUMs; however, <i>end</i> can
' 81 also be NIL, in which case the usual SUBSEQ semantics applies.</p>
' 82
' 83
' 84
' 85 <h2>Examples:</h2>
' 86
' 87 <p>
' 88 <pre>
' 89 cl-prompt> (setf e (unify #(0 1 42 3 4 5) #T(<b>subseq</b> 2 4 ?x ?y)))
' 90 #&lt;ENVIRONMENT xxx&gt;
' 91
' 92 cl-prompt> (find-variable-value '?x e)
' 93 42
' 94 T
' 95
' 96 cl-prompt> (find-variable-value '?y e)
' 97 3
' 98 T
' 99
' 100 cl-prompt> (setq e (unify #(0 1 42 3 4 5) #T(<b>subseq</b> 0 4 42 ?x)))
' 101 --> Error: UNIFICATION-FAILURE
' 102
' 103
' 104 cl-prompt> (setq e (unify "This is a string!" #T(<b>subseq</b> 4 nil &amp;rest ?str)))
' 105 #&lt;ENVIRONMENT xxx&gt;
' 106
' 107 cl-prompt> (find-variable-value '?str e)
' 108 " is a string!"
' 109 </pre>
' 110 </p>
' 111
' 112
' 113 <h2>Affected By:</h2>
' 114
' 115 <p>None.</p>
' 116
' 117
' 118 <h2>Exceptional Situations:</h2>
' 119
' 120 <p>Unifying an SUBSEQ-TEMPLATE against a non-SEQUENCE object results in
' 121 an UNIFICATION-FAILURE error being signaled.</p>
' 122
' 123
' 124 <h2>See Also:</h2>
' 125
' 126 <p>UNIFY</p>
' 127
' 128 <h2>Notes:</h2>
' 129
' 130 <p>None.</p>
' 131
' 132 </td>
' 133
' 134 <!-- <td height="100%">&nbsp;</td> -->
' 135 </tr>
' 136
' 137 <tr height="100%">
' 138 <td height="100%">&nbsp;</td>
' 139 <td valign="top" width="80%" height="100%">
' 140
' 141 <div class="content">
' 142 <div class="text" style="padding-top: 10px;">
' 143
' 144 <h1>News</h1>
' 145
' 146 <p>News in chronological order, most recent on top.
' 147 </p>
' 148
' 149 <ul>
' 150 <li><strong>2004-06-11</strong><br>
' 151 Completed description.
' 152 </li>
' 153
' 154 </ul>
' 155
' 156 </div>
' 157 </div>
' 158
' 159 </td>
' 160
' 161 <td height="100%">&nbsp;</td>
' 162 </tr>
' 163
' 164
' 165
' 166
' 167 <tr>
' 168 <td colspan="3" valign="bottom" align="right">
' 169 <div class="copyright">
' 170 &copy; 2003-2004, Marco Antoniotti, all rights reserved.
' 171 </div>
' 172 </td>
' 173 </tr>
' 174
' 175 </table>
' 176 </body>
' 177 </html>
' 178
' 179 <!-- end of file -- expression-template-class.html -->