/usr/share/doc/racket/syntax/Experimental.html is in racket-doc 6.1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>1.10 Experimental</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">►</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">Syntax:<span class="mywbr"> </span> Meta-<wbr></wbr>Programming Helpers</a></td></tr></table></div><div class="tocviewsublisttop" style="display: none;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="stxparse.html" class="tocviewselflink" data-pltdoc="x">Parsing and Specifying Syntax</a></td></tr><tr><td align="right">2 </td><td><a href="syntax-helpers.html" class="tocviewlink" data-pltdoc="x">Syntax Object Helpers</a></td></tr><tr><td align="right">3 </td><td><a href="Datum_Pattern_Matching.html" class="tocviewlink" data-pltdoc="x">Datum Pattern Matching</a></td></tr><tr><td align="right">4 </td><td><a href="module-helpers.html" class="tocviewlink" data-pltdoc="x">Module-<wbr></wbr>Processing Helpers</a></td></tr><tr><td align="right">5 </td><td><a href="transformer-helpers.html" class="tocviewlink" data-pltdoc="x">Macro Transformer Helpers</a></td></tr><tr><td align="right">6 </td><td><a href="reader-helpers.html" class="tocviewlink" data-pltdoc="x">Reader Helpers</a></td></tr><tr><td align="right">7 </td><td><a href="Parsing_for_Bodies.html" class="tocviewlink" data-pltdoc="x">Parsing <span class="RktSym"><span class="RktStxLink">for</span></span> Bodies</a></td></tr><tr><td align="right">8 </td><td><a href="Unsafe_for_Clause_Transforms.html" class="tocviewlink" data-pltdoc="x">Unsafe <span class="RktSym"><span class="RktStxLink">for</span></span> Clause Transforms</a></td></tr><tr><td align="right">9 </td><td><a href="Source_Locations.html" class="tocviewlink" data-pltdoc="x">Source Locations</a></td></tr><tr><td align="right">10 </td><td><a href="Preserving_Source_Locations.html" class="tocviewlink" data-pltdoc="x">Preserving Source Locations</a></td></tr><tr><td align="right">11 </td><td><a href="toplevel.html" class="tocviewlink" data-pltdoc="x">Non-<wbr></wbr>Module Compilation And Expansion</a></td></tr><tr><td align="right">12 </td><td><a href="trusted-xforms.html" class="tocviewlink" data-pltdoc="x">Trusting Standard Recertifying Transformers</a></td></tr><tr><td align="right">13 </td><td><a href="docprovide.html" class="tocviewlink" data-pltdoc="x">Attaching Documentation to Exports</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">Index</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_1");">▼</a></td><td>1 </td><td><a href="stxparse.html" class="tocviewlink" data-pltdoc="x">Parsing and Specifying Syntax</a></td></tr></table><div class="tocviewsublist" style="display: block;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">1.1 </td><td><a href="stxparse-intro.html" class="tocviewlink" data-pltdoc="x">Introduction</a></td></tr><tr><td align="right">1.2 </td><td><a href="stxparse-examples.html" class="tocviewlink" data-pltdoc="x">Examples</a></td></tr><tr><td align="right">1.3 </td><td><a href="Parsing_Syntax.html" class="tocviewlink" data-pltdoc="x">Parsing Syntax</a></td></tr><tr><td align="right">1.4 </td><td><a href="stxparse-specifying.html" class="tocviewlink" data-pltdoc="x">Specifying Syntax with Syntax Classes</a></td></tr><tr><td align="right">1.5 </td><td><a href="stxparse-patterns.html" class="tocviewlink" data-pltdoc="x">Syntax Patterns</a></td></tr><tr><td align="right">1.6 </td><td><a href="Defining_Simple_Macros.html" class="tocviewlink" data-pltdoc="x">Defining Simple Macros</a></td></tr><tr><td align="right">1.7 </td><td><a href="Literal_Sets_and_Conventions.html" class="tocviewlink" data-pltdoc="x">Literal Sets and Conventions</a></td></tr><tr><td align="right">1.8 </td><td><a href="Library_Syntax_Classes_and_Literal_Sets.html" class="tocviewlink" data-pltdoc="x">Library Syntax Classes and Literal Sets</a></td></tr><tr><td align="right">1.9 </td><td><a href="Debugging_and_Inspection_Tools.html" class="tocviewlink" data-pltdoc="x">Debugging and Inspection Tools</a></td></tr><tr><td align="right">1.10 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Experimental</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_2");">►</a></td><td>1.10 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Experimental</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_2"><table cellspacing="0" cellpadding="0"><tr><td align="right">1.10.1 </td><td><a href="#%28part._.Contracts_for_.Macro_.Sub-expressions%29" class="tocviewlink" data-pltdoc="x">Contracts for Macro Sub-<wbr></wbr>expressions</a></td></tr><tr><td align="right">1.10.2 </td><td><a href="#%28part._.Contracts_for_.Syntax_.Classes%29" class="tocviewlink" data-pltdoc="x">Contracts for Syntax Classes</a></td></tr><tr><td align="right">1.10.3 </td><td><a href="#%28part._.Reflection%29" class="tocviewlink" data-pltdoc="x">Reflection</a></td></tr><tr><td align="right">1.10.4 </td><td><a href="#%28part._.Procedural_.Splicing_.Syntax_.Classes%29" class="tocviewlink" data-pltdoc="x">Procedural Splicing Syntax Classes</a></td></tr><tr><td align="right">1.10.5 </td><td><a href="#%28part._.Ellipsis-head_.Alternative_.Sets%29" class="tocviewlink" data-pltdoc="x">Ellipsis-<wbr></wbr>head Alternative Sets</a></td></tr><tr><td align="right">1.10.6 </td><td><a href="#%28part._.Syntax_.Class_.Specialization%29" class="tocviewlink" data-pltdoc="x">Syntax Class Specialization</a></td></tr><tr><td align="right">1.10.7 </td><td><a href="#%28part._.Syntax_.Templates%29" class="tocviewlink" data-pltdoc="x">Syntax Templates</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber">1.10.1<tt> </tt></span><a href="#%28part._.Contracts_for_.Macro_.Sub-expressions%29" class="tocsubseclink" data-pltdoc="x">Contracts for Macro Sub-<wbr></wbr>expressions</a></td></tr><tr><td><span class="tocsublinknumber">1.10.2<tt> </tt></span><a href="#%28part._.Contracts_for_.Syntax_.Classes%29" class="tocsubseclink" data-pltdoc="x">Contracts for Syntax Classes</a></td></tr><tr><td><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Fprovide..rkt%29._provide-syntax-class%2Fcontract%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">provide-<wbr></wbr>syntax-<wbr></wbr>class/<span class="mywbr"> </span>contract</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Fprovide..rkt%29._syntax-class%2Fc%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">syntax-<wbr></wbr>class/<span class="mywbr"> </span>c</span></span></a></td></tr><tr><td><span class="tocsublinknumber">1.10.3<tt> </tt></span><a href="#%28part._.Reflection%29" class="tocsubseclink" data-pltdoc="x">Reflection</a></td></tr><tr><td><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._reify-syntax-class%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">reify-<wbr></wbr>syntax-<wbr></wbr>class</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._reified-syntax-class~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">reified-<wbr></wbr>syntax-<wbr></wbr>class?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._reified-splicing-syntax-class~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">reified-<wbr></wbr>splicing-<wbr></wbr>syntax-<wbr></wbr>class?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._reified-syntax-class-attributes%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">reified-<wbr></wbr>syntax-<wbr></wbr>class-<wbr></wbr>attributes</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._reified-syntax-class-arity%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">reified-<wbr></wbr>syntax-<wbr></wbr>class-<wbr></wbr>arity</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._reified-syntax-class-keywords%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">reified-<wbr></wbr>syntax-<wbr></wbr>class-<wbr></wbr>keywords</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._reified-syntax-class-curry%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">reified-<wbr></wbr>syntax-<wbr></wbr>class-<wbr></wbr>curry</span></span></a></td></tr><tr><td><span class="tocsublinknumber">1.10.4<tt> </tt></span><a href="#%28part._.Procedural_.Splicing_.Syntax_.Classes%29" class="tocsubseclink" data-pltdoc="x">Procedural Splicing Syntax Classes</a></td></tr><tr><td><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Fsplicing..rkt%29._define-primitive-splicing-syntax-class%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">define-<wbr></wbr>primitive-<wbr></wbr>splicing-<wbr></wbr>syntax-<wbr></wbr>class</span></span></a></td></tr><tr><td><span class="tocsublinknumber">1.10.5<tt> </tt></span><a href="#%28part._.Ellipsis-head_.Alternative_.Sets%29" class="tocsubseclink" data-pltdoc="x">Ellipsis-<wbr></wbr>head Alternative Sets</a></td></tr><tr><td><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Feh..rkt%29._define-eh-alternative-set%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">define-<wbr></wbr>eh-<wbr></wbr>alternative-<wbr></wbr>set</span></span></a></td></tr><tr><td><span class="tocsublinknumber">1.10.6<tt> </tt></span><a href="#%28part._.Syntax_.Class_.Specialization%29" class="tocsubseclink" data-pltdoc="x">Syntax Class Specialization</a></td></tr><tr><td><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Fspecialize..rkt%29._define-syntax-class%2Fspecialize%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">define-<wbr></wbr>syntax-<wbr></wbr>class/<span class="mywbr"> </span>specialize</span></span></a></td></tr><tr><td><span class="tocsublinknumber">1.10.7<tt> </tt></span><a href="#%28part._.Syntax_.Templates%29" class="tocsubseclink" data-pltdoc="x">Syntax Templates</a></td></tr><tr><td><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._template%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">template</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">??</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~40%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">?@</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._define-template-metafunction%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">define-<wbr></wbr>template-<wbr></wbr>metafunction</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.1", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">top</a></span><span class="navright"> <a href="Debugging_and_Inspection_Tools.html" title="backward to "1.9 Debugging and Inspection Tools"" data-pltdoc="x">← prev</a> <a href="stxparse.html" title="up to "1 Parsing and Specifying Syntax"" data-pltdoc="x">up</a> <a href="syntax-helpers.html" title="forward to "2 Syntax Object Helpers"" data-pltdoc="x">next →</a></span> </div><h4 x-source-module="(lib "syntax/scribblings/syntax.scrbl")" x-part-tag=""Experimental"">1.10<tt> </tt><a name="(part._.Experimental)"></a>Experimental</h4><p>The following facilities are experimental.</p><h5 x-source-module="(lib "syntax/scribblings/syntax.scrbl")" x-part-tag=""Contracts_for_Macro_Sub-expressions"">1.10.1<tt> </tt><a name="(part._.Contracts_for_.Macro_.Sub-expressions)"></a><a name="(mod-path._syntax/parse/experimental/contract)"></a>Contracts for Macro Sub-expressions</h5><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left" colspan="2"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._syntax%2Fparse%2Fexperimental%2Fcontract%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">syntax/parse/experimental/contract</span></a><span class="RktPn">)</span></td></tr><tr><td align="left"> </td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">base</span></span></td></tr></table></p><p>This module is deprecated; it reprovides <span class="RktSym"><a href="Library_Syntax_Classes_and_Literal_Sets.html#%28def._%28%28lib._syntax%2Fparse..rkt%29._expr%2Fc%29%29" class="RktValLink" data-pltdoc="x">expr/c</a></span> for backward
compatibility.</p><h5 x-source-module="(lib "syntax/scribblings/syntax.scrbl")" x-part-tag=""Contracts_for_Syntax_Classes"">1.10.2<tt> </tt><a name="(part._.Contracts_for_.Syntax_.Classes)"></a><a name="(mod-path._syntax/parse/experimental/provide)"></a>Contracts for Syntax Classes</h5><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left" colspan="2"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._syntax%2Fparse%2Fexperimental%2Fprovide%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">syntax/parse/experimental/provide</span></a><span class="RktPn">)</span></td></tr><tr><td align="left"> </td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">base</span></span></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><table cellspacing="0" cellpadding="0" class="RktBlk RForeground"><tr><td><span class="RktPn">(</span><a name="(form._((lib._syntax/parse/experimental/provide..rkt)._provide-syntax-class/contract))"></a><span title="Provided from: syntax/parse/experimental/provide | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Fprovide..rkt%29._provide-syntax-class%2Fcontract%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">provide-syntax-class/contract</a></span></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">[</span><span class="RktVar">syntax-class-id</span><span class="hspace"> </span><span class="RktVar">syntax-class-contract</span><span class="RktPn">]</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="stt"> </span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="specgrammar"><tr><td align="right" valign="baseline"><span class="RktVar">syntax-class-contract</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Fprovide..rkt%29._syntax-class%2Fc%29%29" class="RktStxLink" data-pltdoc="x">syntax-class/c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">mandatory-arg</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Fprovide..rkt%29._syntax-class%2Fc%29%29" class="RktStxLink" data-pltdoc="x">syntax-class/c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">mandatory-arg</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">optional-arg</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td></tr><tr><td align="right" valign="baseline"><span class="RktVar">arg</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVar">contract-expr</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVar">keyword</span><span class="hspace"> </span><span class="RktVar">contract-expr</span></td></tr></table></td></tr><tr><td><span class="stt"> </span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace"> </span></td><td><span class="RktVar">contract-expr</span></td><td><span class="hspace"> </span></td><td>:</td><td><span class="hspace"> </span></td><td><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=contract-utilities.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._contract%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">contract?</a></span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Provides the syntax class (or splicing syntax class)
<span class="RktVar">syntax-class-id</span> with the given contracts imposed on its
formal parameters.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><a name="(form._((lib._syntax/parse/experimental/provide..rkt)._syntax-class/c))"></a><span title="Provided from: syntax/parse/experimental/provide | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Fprovide..rkt%29._syntax-class%2Fc%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">syntax-class/c</a></span></span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Keyword recognized by <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Fprovide..rkt%29._provide-syntax-class%2Fcontract%29%29" class="RktStxLink" data-pltdoc="x">provide-syntax-class/contract</a></span>.</div></p><h5 x-source-module="(lib "syntax/scribblings/syntax.scrbl")" x-part-tag=""Reflection"">1.10.3<tt> </tt><a name="(part._.Reflection)"></a><a name="(mod-path._syntax/parse/experimental/reflect)"></a>Reflection</h5><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left" colspan="2"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._syntax%2Fparse%2Fexperimental%2Freflect%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">syntax/parse/experimental/reflect</span></a><span class="RktPn">)</span></td></tr><tr><td align="left"> </td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">base</span></span></td></tr></table></p><p>A syntax class can be reified into a run-time value, and a reified
syntax class can be used in a pattern via the <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._~7ereflect%29%29" class="RktStxLink" data-pltdoc="x">~reflect</a></span> and
<span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._~7esplicing-reflect%29%29" class="RktStxLink" data-pltdoc="x">~splicing-reflect</a></span> pattern forms.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._syntax/parse/experimental/reflect..rkt)._reify-syntax-class))"></a><span title="Provided from: syntax/parse/experimental/reflect | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._reify-syntax-class%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">reify-syntax-class</a></span></span><span class="hspace"> </span><span class="RktVar">syntax-class-id</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Reifies the syntax class named <span class="RktVar">syntax-class-id</span> as a run-time
value. The same form also handles splicing syntax classes. Syntax
classes with the <span class="RktPn">#:no-delimit-cut</span> option cannot be reified.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._syntax/parse/experimental/reflect..rkt)._reified-syntax-class~3f))"></a><span title="Provided from: syntax/parse/experimental/reflect | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._reified-syntax-class~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">reified-syntax-class?</a></span></span><span class="hspace"> </span><span class="RktVar">x</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._syntax/parse/experimental/reflect..rkt)._reified-splicing-syntax-class~3f))"></a><span title="Provided from: syntax/parse/experimental/reflect | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._reified-splicing-syntax-class~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">reified-splicing-syntax-class?</a></span></span><span class="hspace"> </span><span class="RktVar">x</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">x</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">x</span> is a reified (normal) syntax class
or a reified splicing syntax class, respectively.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._syntax/parse/experimental/reflect..rkt)._reified-syntax-class-attributes))"></a><span title="Provided from: syntax/parse/experimental/reflect | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._reified-syntax-class-attributes%29%29" class="RktValDef RktValLink" data-pltdoc="x">reified-syntax-class-attributes</a></span></span><span class="hspace"> </span><span class="RktVar">r</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._list%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">list/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">symbol?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">r</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._reified-syntax-class~3f%29%29" class="RktValLink" data-pltdoc="x">reified-syntax-class?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._reified-splicing-syntax-class~3f%29%29" class="RktValLink" data-pltdoc="x">reified-splicing-syntax-class?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the reified syntax class’s attributes.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._syntax/parse/experimental/reflect..rkt)._reified-syntax-class-arity))"></a><span title="Provided from: syntax/parse/experimental/reflect | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._reified-syntax-class-arity%29%29" class="RktValDef RktValLink" data-pltdoc="x">reified-syntax-class-arity</a></span></span><span class="hspace"> </span><span class="RktVar">r</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=procedures.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._procedure-arity%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">procedure-arity?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">r</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._reified-syntax-class~3f%29%29" class="RktValLink" data-pltdoc="x">reified-syntax-class?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._reified-splicing-syntax-class~3f%29%29" class="RktValLink" data-pltdoc="x">reified-splicing-syntax-class?</a></span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._syntax/parse/experimental/reflect..rkt)._reified-syntax-class-keywords))"></a><span title="Provided from: syntax/parse/experimental/reflect | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._reified-syntax-class-keywords%29%29" class="RktValDef RktValLink" data-pltdoc="x">reified-syntax-class-keywords</a></span></span><span class="hspace"> </span><span class="RktVar">r</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="prototype"><tr><td><span class="hspace"> </span></td><td>→</td><td><span class="hspace"> </span></td><td><table cellspacing="0" cellpadding="0"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=keywords.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._keyword%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">keyword?</a></span><span class="RktPn">)</span></td><td><span class="hspace"> </span></td><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=keywords.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._keyword%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">keyword?</a></span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">r</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._reified-syntax-class~3f%29%29" class="RktValLink" data-pltdoc="x">reified-syntax-class?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._reified-splicing-syntax-class~3f%29%29" class="RktValLink" data-pltdoc="x">reified-splicing-syntax-class?</a></span><span class="RktPn">)</span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Returns the reified syntax class’s arity and keywords,
respectively. Compare with <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=procedures.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._procedure-arity%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">procedure-arity</a></span> and
<span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=procedures.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._procedure-keywords%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">procedure-keywords</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((lib._syntax/parse/experimental/reflect..rkt)._reified-syntax-class-curry))"></a><span title="Provided from: syntax/parse/experimental/reflect | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._reified-syntax-class-curry%29%29" class="RktValDef RktValLink" data-pltdoc="x">reified-syntax-class-curry</a></span></span></td><td><span class="hspace"> </span></td><td><span class="RktVar">r</span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktVar">arg</span><span class="hspace"> </span><span class="RktMeta">...</span></td><td><span class="hspace"> </span></td></tr><tr><td><span class="hspace"> </span></td><td><span class="hspace"> </span></td><td><span class="RktPn">#:<kw></span><span class="hspace"> </span><span class="RktVar">kw-arg</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></td><td><span class="hspace"> </span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._reified-syntax-class~3f%29%29" class="RktValLink" data-pltdoc="x">reified-syntax-class?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._reified-splicing-syntax-class~3f%29%29" class="RktValLink" data-pltdoc="x">reified-splicing-syntax-class?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">r</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._reified-syntax-class~3f%29%29" class="RktValLink" data-pltdoc="x">reified-syntax-class?</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._reified-splicing-syntax-class~3f%29%29" class="RktValLink" data-pltdoc="x">reified-splicing-syntax-class?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">arg</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">kw-arg</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Partially applies the reified syntax class to the given arguments. If
more arguments are given than the reified syntax class accepts, an
error is raised.</div></p><p><table cellspacing="0" cellpadding="0"><tr><td align="right" valign="baseline"><span class="hspace"> </span><span class="RktVar">S-pattern</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVar">....</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._~7ereflect%29%29" class="RktStxLink" data-pltdoc="x">~reflect</a></span><span class="hspace"> </span><span class="RktVar">var-id</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">reified-expr</span><span class="hspace"> </span><span class="RktVar">arg-expr</span><span class="hspace"> </span><span class="RktSym">...</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVar">maybe-attrs</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td></tr><tr><td align="right" valign="baseline"><span class="hspace"> </span><span class="RktVar">H-pattern</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVar">....</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._~7esplicing-reflect%29%29" class="RktStxLink" data-pltdoc="x">~splicing-reflect</a></span><span class="hspace"> </span><span class="RktVar">var-id</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">reified-expr</span><span class="hspace"> </span><span class="RktVar">arg-expr</span><span class="hspace"> </span><span class="RktSym">...</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">maybe-attrs</span><span class="RktPn">)</span></td></tr></table></td></tr></table></p><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(form._((lib._syntax/parse/experimental/reflect..rkt)._~7ereflect))"></a><span title="Provided from: syntax/parse/experimental/reflect | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._~7ereflect%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">~reflect</a></span></span><span class="hspace"> </span><span class="RktVar">var-id</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">reified-expr</span><span class="hspace"> </span><span class="RktVar">arg-expr</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVar">maybe-attrs</span><span class="RktPn">)</span></td></tr><tr><td><span class="stt"> </span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="specgrammar"><tr><td align="right" valign="baseline"><span class="RktVar">maybe-attrs</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td></td></tr></table></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:attributes</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">attr-arity-decl</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr></table></td></tr></table></blockquote><p>Like <span class="RktSym"><a href="stxparse-patterns.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7evar%29%29" class="RktStxLink" data-pltdoc="x">~var</a></span>, except that the syntax class position is an
expression evaluating to a reified syntax object, not a syntax class
name, and the attributes bound by the reified syntax class (if any)
must be specified explicitly.</p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(form._((lib._syntax/parse/experimental/reflect..rkt)._~7esplicing-reflect))"></a><span title="Provided from: syntax/parse/experimental/reflect | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._~7esplicing-reflect%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">~splicing-reflect</a></span></span><span class="hspace"> </span><span class="RktVar">var-id</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">reified-expr</span><span class="hspace"> </span><span class="RktVar">arg-expr</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVar">maybe-attrs</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Like <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._~7ereflect%29%29" class="RktStxLink" data-pltdoc="x">~reflect</a></span> but for reified splicing syntax classes.</p></blockquote><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-specifying.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._define-syntax-class%29%29" class="RktStxLink" data-pltdoc="x">define-syntax-class</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">nat></span><span class="hspace"> </span><span class="RktSym">x</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:description</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=Writing.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._format%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">format</a></span><span class="hspace"> </span><span class="RktVal">"natural number greater than ~s"</span><span class="hspace"> </span><span class="RktSym">x</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:attributes</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">diff</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-specifying.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._pattern%29%29" class="RktStxLink" data-pltdoc="x">pattern</a></span><span class="hspace"> </span><span class="RktSym">n:nat</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:when</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%7E3e%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">></a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-e%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">syntax-e</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktSym">n</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">x</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:with</span><span class="hspace"> </span><span class="RktSym">diff</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._-%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x"><span class="nobreak">-</span></a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-e%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">syntax-e</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktSym">n</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">x</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-specifying.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._define-syntax-class%29%29" class="RktStxLink" data-pltdoc="x">define-syntax-class</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">nat/mult</span><span class="hspace"> </span><span class="RktSym">x</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:description</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=Writing.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._format%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">format</a></span><span class="hspace"> </span><span class="RktVal">"natural number multiple of ~s"</span><span class="hspace"> </span><span class="RktSym">x</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:attributes</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">quot</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-specifying.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._pattern%29%29" class="RktStxLink" data-pltdoc="x">pattern</a></span><span class="hspace"> </span><span class="RktSym">n:nat</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:when</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._zero%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">zero?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._remainder%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">remainder</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-e%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">syntax-e</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktSym">n</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">x</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:with</span><span class="hspace"> </span><span class="RktSym">quot</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._quotient%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">quotient</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-e%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">syntax-e</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktSym">n</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">x</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">r-nat></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._reify-syntax-class%29%29" class="RktStxLink" data-pltdoc="x">reify-syntax-class</a></span><span class="hspace"> </span><span class="RktSym">nat></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">r-nat/mult</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._reify-syntax-class%29%29" class="RktStxLink" data-pltdoc="x">reify-syntax-class</a></span><span class="hspace"> </span><span class="RktSym">nat/mult</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">partition/r</span><span class="hspace"> </span><span class="RktSym">stx</span><span class="hspace"> </span><span class="RktSym">r</span><span class="hspace"> </span><span class="RktSym">n</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktSym">stx</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-patterns.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eor%29%29" class="RktStxLink" data-pltdoc="x">~or</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._~7ereflect%29%29" class="RktStxLink" data-pltdoc="x">~reflect</a></span><span class="hspace"> </span><span class="RktSym">yes</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">r</span><span class="hspace"> </span><span class="RktSym">n</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">no</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym">yes</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">no</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym">partition/r</span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="hspace"> </span><span class="RktVal">4</span><span class="hspace"> </span><span class="RktVal">5</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">r-nat></span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#<syntax:177:0 ((4 5) (1 2 3))></span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym">partition/r</span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="hspace"> </span><span class="RktVal">4</span><span class="hspace"> </span><span class="RktVal">5</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">r-nat/mult</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#<syntax:177:0 ((2 4) (1 3 5))></span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">bad-attrs</span><span class="hspace"> </span><span class="RktSym">r</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktVal">6</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Freflect..rkt%29._~7ereflect%29%29" class="RktStxLink" data-pltdoc="x">~reflect</a></span><span class="hspace"> </span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">r</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">#:attributes</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">diff</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktSym">x.diff</span><span class="RktPn">]</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym">bad-attrs</span><span class="hspace"> </span><span class="RktSym">r-nat></span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#<syntax 3></span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym">bad-attrs</span><span class="hspace"> </span><span class="RktSym">r-nat/mult</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktErr">reflect-syntax-class: reified syntax-class is missing</span></p></td></tr><tr><td><p><span class="RktErr">declared attribute `diff'</span></p></td></tr></table></blockquote></td></tr></table></p><h5 x-source-module="(lib "syntax/scribblings/syntax.scrbl")" x-part-tag=""Procedural_Splicing_Syntax_Classes"">1.10.4<tt> </tt><a name="(part._.Procedural_.Splicing_.Syntax_.Classes)"></a><a name="(mod-path._syntax/parse/experimental/splicing)"></a>Procedural Splicing Syntax Classes</h5><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left" colspan="2"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._syntax%2Fparse%2Fexperimental%2Fsplicing%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">syntax/parse/experimental/splicing</span></a><span class="RktPn">)</span></td></tr><tr><td align="left"> </td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">base</span></span></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><table cellspacing="0" cellpadding="0" class="RktBlk RForeground"><tr><td><span class="RktPn">(</span><a name="(form._((lib._syntax/parse/experimental/splicing..rkt)._define-primitive-splicing-syntax-class))"></a><span title="Provided from: syntax/parse/experimental/splicing | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Fsplicing..rkt%29._define-primitive-splicing-syntax-class%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">define-primitive-splicing-syntax-class</a></span></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">name-id</span><span class="hspace"> </span><span class="RktVar">param-id</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">maybe-description</span><span class="hspace"> </span><span class="RktVar">maybe-attrs</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">parser-expr</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="stt"> </span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace"> </span></td><td><span class="RktSym">parser</span></td><td><span class="hspace"> </span></td><td>:</td><td><span class="hspace"> </span></td><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">syntax?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%252A%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span>*</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">any</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._cons%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">cons/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-positive-integer%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">exact-positive-integer?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">list?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Defines a splicing syntax via a procedural parser.</div></p><p>The parser procedure is given two arguments, the syntax to parse and a
failure procedure. To signal a successful parse, the parser procedure
returns a list of <span class="RktSym">N</span>+1 elements, where <span class="RktSym">N</span> is the
number of attributes declared by the splicing syntax class. The first
element is the size of the prefix consumed. The rest of the list
contains the values of the attributes.</p><p>To indicate failure, the parser calls the failure procedure with an
optional message argument.</p><h5 x-source-module="(lib "syntax/scribblings/syntax.scrbl")" x-part-tag=""Ellipsis-head_Alternative_Sets"">1.10.5<tt> </tt><a name="(part._.Ellipsis-head_.Alternative_.Sets)"></a><a name="(mod-path._syntax/parse/experimental/eh)"></a>Ellipsis-head Alternative Sets</h5><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._syntax%2Fparse%2Fexperimental%2Feh%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">syntax/parse/experimental/eh</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">base</span></span></td></tr></table></p><p>Unlike <a href="stxparse-patterns.html#%28tech._single._term._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">single-term patterns</span></a> and <a href="stxparse-patterns.html#%28tech._head._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">head patterns</span></a>, <a href="stxparse-patterns.html#%28tech._ellipsis._head._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">ellipsis-head patterns</span></a>
cannot be encapsulated by syntax classes, since they describe not only
sets of terms but also repetition constraints.</p><p>This module provides <a name="(tech._ellipsis._head._alternative._set)"></a><span style="font-style: italic">ellipsis-head alternative sets</span>,
reusable encapsulations of ellipsis-head patterns.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._syntax/parse/experimental/eh..rkt)._define-eh-alternative-set))"></a><span title="Provided from: syntax/parse/experimental/eh | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Feh..rkt%29._define-eh-alternative-set%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">define-eh-alternative-set</a></span></span><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span><span class="RktVar">eh-alternative</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="stt"> </span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="specgrammar"><tr><td align="right" valign="baseline"><span class="RktVar">alternative</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-specifying.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._pattern%29%29" class="RktStxLink" data-pltdoc="x">pattern</a></span><span class="hspace"> </span><span class="RktVar">EH-pattern</span><span class="RktPn">)</span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Defines <span class="RktVar">name</span> as an ellipsis-head alternative set. Using
<span class="RktVar">name</span> (via <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Feh..rkt%29._~7eeh-var%29%29" class="RktStxLink" data-pltdoc="x">~eh-var</a></span>) in an ellipsis-head pattern is
equivalent to including each of the alternatives in the pattern via
<a href="stxparse-patterns.html#%28elem._%28pattern-link._%28~7eor._eh%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~or</span><span style="vertical-align: super; font-size: 80%">eh</span></a>, except that the attributes bound by the alternatives are
prefixed with the name given to <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Feh..rkt%29._~7eeh-var%29%29" class="RktStxLink" data-pltdoc="x">~eh-var</a></span>.</div></p><p>Unlike syntax classes, ellipsis-head alternative sets must be defined
before they are referenced.</p><p><table cellspacing="0" cellpadding="0"><tr><td align="right" valign="baseline"><span class="hspace"> </span><span class="RktVar">EH-pattern</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVar">....</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Feh..rkt%29._~7eeh-var%29%29" class="RktStxLink" data-pltdoc="x">~eh-var</a></span><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span><span class="RktVar">eh-alternative-set-id</span><span class="RktPn">)</span></td></tr></table></p><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(form._((lib._syntax/parse/experimental/eh..rkt)._~7eeh-var))"></a><span title="Provided from: syntax/parse/experimental/eh | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Feh..rkt%29._~7eeh-var%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">~eh-var</a></span></span><span class="hspace"> </span><span class="RktVar">name</span><span class="hspace"> </span><span class="RktVar">eh-alternative-set-id</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Includes the alternatives of <span class="RktVar">eh-alternative-set-id</span>, prefixing
their attributes with <span class="RktVar">name</span>.</p></blockquote><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Feh..rkt%29._define-eh-alternative-set%29%29" class="RktStxLink" data-pltdoc="x">define-eh-alternative-set</a></span><span class="hspace"> </span><span class="RktSym">options</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-specifying.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._pattern%29%29" class="RktStxLink" data-pltdoc="x">pattern</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-patterns.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eonce%29%29" class="RktStxLink" data-pltdoc="x">~once</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-patterns.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktPn">#:a</span><span class="hspace"> </span><span class="RktSym">a:expr</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">#:name</span><span class="hspace"> </span><span class="RktVal">"#:a option"</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-specifying.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._pattern%29%29" class="RktStxLink" data-pltdoc="x">pattern</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-patterns.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktPn">#:b</span><span class="hspace"> </span><span class="RktSym">b:expr</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">parse/options</span><span class="hspace"> </span><span class="RktSym">stx</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktSym">stx</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Feh..rkt%29._~7eeh-var%29%29" class="RktStxLink" data-pltdoc="x">~eh-var</a></span><span class="hspace"> </span><span class="RktSym">s</span><span class="hspace"> </span><span class="RktSym">options</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">s.a</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">s.b</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym">parse/options</span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">m</span><span class="hspace"> </span><span class="RktPn">#:a</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktPn">#:b</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktPn">#:b</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#<syntax:184:0 (1 (2 3))></span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym">parse/options</span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">m</span><span class="hspace"> </span><span class="RktPn">#:a</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktPn">#:a</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktErr">m: too many occurrences of #:a option at: (m #:a 1 #:a 2)</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">parse/more-options</span><span class="hspace"> </span><span class="RktSym">stx</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktSym">stx</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-patterns.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eor%29%29" class="RktStxLink" data-pltdoc="x">~or</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Feh..rkt%29._~7eeh-var%29%29" class="RktStxLink" data-pltdoc="x">~eh-var</a></span><span class="hspace"> </span><span class="RktSym">s</span><span class="hspace"> </span><span class="RktSym">options</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-patterns.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktPn">#:c</span><span class="hspace"> </span><span class="RktSym">c1:expr</span><span class="hspace"> </span><span class="RktSym">c2:expr</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">s.a</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">s.b</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym">c1</span><span class="hspace"> </span><span class="RktSym">c2</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym">parse/more-options</span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">m</span><span class="hspace"> </span><span class="RktPn">#:a</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktPn">#:b</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktPn">#:c</span><span class="hspace"> </span><span class="RktVal">3</span><span class="hspace"> </span><span class="RktVal">4</span><span class="hspace"> </span><span class="RktPn">#:c</span><span class="hspace"> </span><span class="RktVal">5</span><span class="hspace"> </span><span class="RktVal">6</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#<syntax:187:0 (1 (2) ((3 4) (5 6)))></span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Feh..rkt%29._define-eh-alternative-set%29%29" class="RktStxLink" data-pltdoc="x">define-eh-alternative-set</a></span><span class="hspace"> </span><span class="RktSym">ext-options</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-specifying.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._pattern%29%29" class="RktStxLink" data-pltdoc="x">pattern</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Feh..rkt%29._~7eeh-var%29%29" class="RktStxLink" data-pltdoc="x">~eh-var</a></span><span class="hspace"> </span><span class="RktSym">s</span><span class="hspace"> </span><span class="RktSym">options</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-specifying.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._pattern%29%29" class="RktStxLink" data-pltdoc="x">pattern</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-patterns.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktPn">#:c</span><span class="hspace"> </span><span class="RktSym">c1</span><span class="hspace"> </span><span class="RktSym">c2</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">m</span><span class="hspace"> </span><span class="RktPn">#:a</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktPn">#:b</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktPn">#:c</span><span class="hspace"> </span><span class="RktVal">3</span><span class="hspace"> </span><span class="RktVal">4</span><span class="hspace"> </span><span class="RktPn">#:c</span><span class="hspace"> </span><span class="RktVal">5</span><span class="hspace"> </span><span class="RktVal">6</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Feh..rkt%29._~7eeh-var%29%29" class="RktStxLink" data-pltdoc="x">~eh-var</a></span><span class="hspace"> </span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktSym">ext-options</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">x.s.a</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">x.s.b</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym">x.c1</span><span class="hspace"> </span><span class="RktSym">x.c2</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">#<syntax:190:0 (1 (2) ((3 4) (5 6)))></span></p></td></tr></table></blockquote></td></tr></table></p><h5 x-source-module="(lib "syntax/scribblings/syntax.scrbl")" x-part-tag=""Syntax_Class_Specialization"">1.10.6<tt> </tt><a name="(part._.Syntax_.Class_.Specialization)"></a><a name="(mod-path._syntax/parse/experimental/specialize)"></a>Syntax Class Specialization</h5><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left" colspan="2"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._syntax%2Fparse%2Fexperimental%2Fspecialize%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">syntax/parse/experimental/specialize</span></a><span class="RktPn">)</span></td></tr><tr><td align="left"> </td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">base</span></span></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._syntax/parse/experimental/specialize..rkt)._define-syntax-class/specialize))"></a><span title="Provided from: syntax/parse/experimental/specialize | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Fspecialize..rkt%29._define-syntax-class%2Fspecialize%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">define-syntax-class/specialize</a></span></span><span class="hspace"> </span><span class="RktVar">header</span><span class="hspace"> </span><span class="RktVar">syntax-class-use</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="stt"> </span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="specgrammar"><tr><td align="right" valign="baseline"><span class="RktVar">header</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVar">id</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktVar">id</span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktVar">kw-formals</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td></tr><tr><td align="right" valign="baseline"><span class="RktVar">syntax-class-use</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVar">target-stxclass-id</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktVar">target-stxclass-id</span><span class="hspace"> </span><span class="RktVar">arg</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Defines <span class="RktVar">id</span> as a syntax class with the same attributes,
options (eg, <span class="RktPn">#:commit</span>, <span class="RktPn">#:no-delimit-cut</span>), and
patterns as <span class="RktVar">target-stxclass-id</span> but with the given
<span class="RktVar">arg</span>s supplied.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Fspecialize..rkt%29._define-syntax-class%2Fspecialize%29%29" class="RktStxLink" data-pltdoc="x">define-syntax-class/specialize</a></span><span class="hspace"> </span><span class="RktSym">nat>10</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">nat></span><span class="hspace"> </span><span class="RktVal">10</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktVal">11</span><span class="hspace"> </span><span class="RktVal">12</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym">n:nat>10</span><span class="hspace"> </span><span class="RktMeta"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">ok</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'ok</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktVal">8</span><span class="hspace"> </span><span class="RktVal">9</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym">n:nat>10</span><span class="hspace"> </span><span class="RktMeta"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">ok</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktErr">?: expected natural number greater than 10 at: 8</span></p></td></tr></table></blockquote></td></tr></table></p><h5 x-source-module="(lib "syntax/scribblings/syntax.scrbl")" x-part-tag=""Syntax_Templates"">1.10.7<tt> </tt><a name="(part._.Syntax_.Templates)"></a><a name="(mod-path._syntax/parse/experimental/template)"></a>Syntax Templates</h5><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left" colspan="2"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._syntax%2Fparse%2Fexperimental%2Ftemplate%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">syntax/parse/experimental/template</span></a><span class="RktPn">)</span></td></tr><tr><td align="left"> </td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">base</span></span></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._syntax/parse/experimental/template..rkt)._template))"></a><span title="Provided from: syntax/parse/experimental/template | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._template%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">template</a></span></span><span class="hspace"> </span><span class="RktVar">tmpl</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="stt"> </span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="specgrammar"><tr><td align="right" valign="baseline"><span class="RktVar">tmpl</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVar">pattern-variable-id</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktVar">head-tmpl</span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktVar">tmpl</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktVar">head-tmpl</span><span class="hspace"> </span><span class="RktVar">ellipsis</span><span class="hspace"> </span><span class="RktMeta">...+</span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktVar">tmpl</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktVar">metafunction-id</span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktVar">tmpl</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~3f%29%29" class="RktStxLink" data-pltdoc="x">??</a></span><span class="hspace"> </span><span class="RktVar">tmpl</span><span class="hspace"> </span><span class="RktVar">tmpl</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVar">head-tmpl</span><span class="hspace"> </span><span class="RktVal">...</span><span class="RktVal">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVal">#s</span><span class="RktVal">(</span><span class="RktVal">prefab-struct-key</span><span class="hspace"> </span><span class="RktVar">head-tmpl</span><span class="hspace"> </span><span class="RktVal">...</span><span class="RktVal">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVal">#&</span><span class="RktVar">tmpl</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVar">constant-term</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td></tr><tr><td align="right" valign="baseline"><span class="RktVar">head-templ</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVar">tmpl</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~3f%29%29" class="RktStxLink" data-pltdoc="x">??</a></span><span class="hspace"> </span><span class="RktVar">head-tmpl</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~3f%29%29" class="RktStxLink" data-pltdoc="x">??</a></span><span class="hspace"> </span><span class="RktVar">head-tmpl</span><span class="hspace"> </span><span class="RktVar">head-tmpl</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~40%29%29" class="RktStxLink" data-pltdoc="x">?@</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktVar">tmpl</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td></tr><tr><td align="right" valign="baseline"><span class="RktVar">ellipsis</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Constructs a syntax object from a syntax template, like
<span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._syntax%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">syntax</a></span>, but provides additional templating forms for dealing
with optional terms and splicing sequences of terms. Only the
additional forms are described here; see <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._syntax%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">syntax</a></span> for
descriptions of pattern variables, etc.</div></p><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~3f%29%29" class="RktStxLink" data-pltdoc="x">??</a></span><span class="hspace"> </span><span class="RktVar">tmpl</span><span class="hspace"> </span><span class="RktVar">alt-tmpl</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Produces <span class="RktVar">tmpl</span> unless any attribute used in <span class="RktVar">tmpl</span> has
an absent value; in that case, <span class="RktVar">alt-tmpl</span> is used instead.</p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">m</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-patterns.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eoptional%29%29" class="RktStxLink" data-pltdoc="x">~optional</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-patterns.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktPn">#:op</span><span class="hspace"> </span><span class="RktSym">op:expr</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">arg:expr</span><span class="hspace"> </span><span class="RktMeta"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._template%29%29" class="RktStxLink" data-pltdoc="x">template</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~3f%29%29" class="RktStxLink" data-pltdoc="x">??</a></span><span class="hspace"> </span><span class="RktSym">op</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">arg</span><span class="hspace"> </span><span class="RktMeta"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">#<syntax:194:0 (+ 1 2 3)></span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">m</span><span class="hspace"> </span><span class="RktPn">#:op</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._max%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">max</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-patterns.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eoptional%29%29" class="RktStxLink" data-pltdoc="x">~optional</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-patterns.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktPn">#:op</span><span class="hspace"> </span><span class="RktSym">op:expr</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">arg:expr</span><span class="hspace"> </span><span class="RktMeta"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._template%29%29" class="RktStxLink" data-pltdoc="x">template</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~3f%29%29" class="RktStxLink" data-pltdoc="x">??</a></span><span class="hspace"> </span><span class="RktSym">op</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%252B%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">+</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">arg</span><span class="hspace"> </span><span class="RktMeta"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">#<syntax:195:0 (max 1 2 3)></span></p></td></tr></table></blockquote></td></tr></table><p>If <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~3f%29%29" class="RktStxLink" data-pltdoc="x">??</a></span> is used as a head-template, then its sub-templates may
also be head-templates.</p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">m</span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace"> </span><span class="RktSym">x:expr</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-patterns.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eoptional%29%29" class="RktStxLink" data-pltdoc="x">~optional</a></span><span class="hspace"> </span><span class="RktSym">y:expr</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._template%29%29" class="RktStxLink" data-pltdoc="x">template</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">m2</span><span class="hspace"> </span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~3f%29%29" class="RktStxLink" data-pltdoc="x">??</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~40%29%29" class="RktStxLink" data-pltdoc="x">?@</a></span><span class="hspace"> </span><span class="RktPn">#:y</span><span class="hspace"> </span><span class="RktSym">y</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~40%29%29" class="RktStxLink" data-pltdoc="x">?@</a></span><span class="hspace"> </span><span class="RktPn">#:z</span><span class="hspace"> </span><span class="RktVal">0</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">#<syntax:196:0 (m2 1 #:z 0)></span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">m</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace"> </span><span class="RktSym">x:expr</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-patterns.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eoptional%29%29" class="RktStxLink" data-pltdoc="x">~optional</a></span><span class="hspace"> </span><span class="RktSym">y:expr</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._template%29%29" class="RktStxLink" data-pltdoc="x">template</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">m2</span><span class="hspace"> </span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~3f%29%29" class="RktStxLink" data-pltdoc="x">??</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~40%29%29" class="RktStxLink" data-pltdoc="x">?@</a></span><span class="hspace"> </span><span class="RktPn">#:y</span><span class="hspace"> </span><span class="RktSym">y</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~40%29%29" class="RktStxLink" data-pltdoc="x">?@</a></span><span class="hspace"> </span><span class="RktPn">#:z</span><span class="hspace"> </span><span class="RktVal">0</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">#<syntax:197:0 (m2 1 #:y 2)></span></p></td></tr></table></blockquote></td></tr></table></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~3f%29%29" class="RktStxLink" data-pltdoc="x">??</a></span><span class="hspace"> </span><span class="RktVar">head-tmpl</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Produces <span class="RktVar">head-tmpl</span> unless any attribute used in
<span class="RktVar">head-tmpl</span> has an absent value; in that case, the term is
omitted. Can only occur in head position in a template.</p><p>Equivalent to <span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~3f%29%29" class="RktStxLink" data-pltdoc="x">??</a></span><span class="stt"> </span><span class="RktVar">head-tmpl</span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~40%29%29" class="RktStxLink" data-pltdoc="x">?@</a></span><span class="RktPn">)</span><span class="RktPn">)</span>.</p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">m</span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace"> </span><span class="RktSym">x:expr</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-patterns.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eoptional%29%29" class="RktStxLink" data-pltdoc="x">~optional</a></span><span class="hspace"> </span><span class="RktSym">y:expr</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._template%29%29" class="RktStxLink" data-pltdoc="x">template</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">m2</span><span class="hspace"> </span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~3f%29%29" class="RktStxLink" data-pltdoc="x">??</a></span><span class="hspace"> </span><span class="RktSym">y</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">#<syntax:198:0 (m2 1)></span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">m</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace"> </span><span class="RktSym">x:expr</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-patterns.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eoptional%29%29" class="RktStxLink" data-pltdoc="x">~optional</a></span><span class="hspace"> </span><span class="RktSym">y:expr</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._template%29%29" class="RktStxLink" data-pltdoc="x">template</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">m2</span><span class="hspace"> </span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~3f%29%29" class="RktStxLink" data-pltdoc="x">??</a></span><span class="hspace"> </span><span class="RktSym">y</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">#<syntax:199:0 (m2 1 2)></span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">m</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace"> </span><span class="RktSym">x:expr</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-patterns.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eoptional%29%29" class="RktStxLink" data-pltdoc="x">~optional</a></span><span class="hspace"> </span><span class="RktSym">y:expr</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._template%29%29" class="RktStxLink" data-pltdoc="x">template</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">m2</span><span class="hspace"> </span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~3f%29%29" class="RktStxLink" data-pltdoc="x">??</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~40%29%29" class="RktStxLink" data-pltdoc="x">?@</a></span><span class="hspace"> </span><span class="RktPn">#:y</span><span class="hspace"> </span><span class="RktSym">y</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">#<syntax:200:0 (m2 1 #:y 2)></span></p></td></tr></table></blockquote></td></tr></table></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~40%29%29" class="RktStxLink" data-pltdoc="x">?@</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktVar">tmpl</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Similar to <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=quasiquote.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._unquote-splicing%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">unquote-splicing</a></span>, splices the result of
<span class="RktVar">tmpl</span> (which must produce a syntax list) into the surrounding
template. Can only occur in head position in a template.</p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Example:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">m</span><span class="hspace"> </span><span class="RktPn">#:a</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktPn">#:b</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="hspace"> </span><span class="RktVal">4</span><span class="hspace"> </span><span class="RktPn">#:e</span><span class="hspace"> </span><span class="RktVal">5</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-patterns.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eor%29%29" class="RktStxLink" data-pltdoc="x">~or</a></span><span class="hspace"> </span><span class="RktSym">pos:expr</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-patterns.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktSym">kw:keyword</span><span class="hspace"> </span><span class="RktSym">kwarg:expr</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktMeta"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._template%29%29" class="RktStxLink" data-pltdoc="x">template</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">m2</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~40%29%29" class="RktStxLink" data-pltdoc="x">?@</a></span><span class="hspace"> </span><span class="RktSym">kw</span><span class="hspace"> </span><span class="RktSym">kwarg</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktMeta"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="hspace"> </span><span class="RktSym">pos</span><span class="hspace"> </span><span class="RktMeta"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">#<syntax:201:0 (m2 #:a 1 #:b 2 #:e 5 3 4)></span></p></td></tr></table></blockquote></td></tr></table><p>The <span class="RktVar">tmpl</span> must produce a proper syntax list, but it does not
need to be expressed as a proper list. For example, to unpack pattern
variables that contain syntax lists, use a “dotted” template:</p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._with-syntax%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">with-syntax</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">a</span><span class="hspace"> </span><span class="RktSym">b</span><span class="hspace"> </span><span class="RktSym">c</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._template%29%29" class="RktStxLink" data-pltdoc="x">template</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~40%29%29" class="RktStxLink" data-pltdoc="x">?@</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym">x</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">d</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">#<syntax:202:0 (a b c d)></span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._with-syntax%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">with-syntax</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktMeta"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVal">4</span><span class="hspace"> </span><span class="RktVal">5</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._template%29%29" class="RktStxLink" data-pltdoc="x">template</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~40%29%29" class="RktStxLink" data-pltdoc="x">?@</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktSym">x</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktMeta"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">#<syntax:203:0 (1 2 3 4 5)></span></p></td></tr></table></blockquote></td></tr></table></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><span class="RktVar">metafunction-id</span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktVar">tmpl</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Applies the template metafunction named <span class="RktVar">metafunction-id</span> to
the result of the template (including <span class="RktVar">metafunction-id</span>
itself). See <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._define-template-metafunction%29%29" class="RktStxLink" data-pltdoc="x">define-template-metafunction</a></span> for examples.</p></blockquote><p>The <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~3f%29%29" class="RktStxLink" data-pltdoc="x">??</a></span> and <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~40%29%29" class="RktStxLink" data-pltdoc="x">?@</a></span> forms and metafunction applications
are disabled in an “escaped template” (see <span class="RktVar">stat-template</span>
under <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._syntax%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">syntax</a></span>).</p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Example:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._template%29%29" class="RktStxLink" data-pltdoc="x">template</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktMeta"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~40%29%29" class="RktStxLink" data-pltdoc="x">?@</a></span><span class="hspace"> </span><span class="RktSym">a</span><span class="hspace"> </span><span class="RktSym">b</span><span class="hspace"> </span><span class="RktSym">c</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">d</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#<syntax:204:0 ((?@ a b c) d)></span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><a name="(form._((lib._syntax/parse/experimental/template..rkt)._~3f~3f))"></a><span title="Provided from: syntax/parse/experimental/template | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~3f%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">??</a></span></span></p></blockquote></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><a name="(form._((lib._syntax/parse/experimental/template..rkt)._~3f~40))"></a><span title="Provided from: syntax/parse/experimental/template | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._~3f~40%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">?@</a></span></span></p></blockquote></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Auxiliary forms used by <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._template%29%29" class="RktStxLink" data-pltdoc="x">template</a></span>. They may not be used as
expressions.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(form._((lib._syntax/parse/experimental/template..rkt)._define-template-metafunction))"></a><span title="Provided from: syntax/parse/experimental/template | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._define-template-metafunction%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">define-template-metafunction</a></span></span><span class="hspace"> </span><span class="RktVar">metafunction-id</span><span class="hspace"> </span><span class="RktVar">expr</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._define-template-metafunction%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">define-template-metafunction</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">metafunction-id</span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktVar">formals</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVar">body</span><span class="hspace"> </span><span class="RktMeta">...+</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Defines <span class="RktVar">metafunction-id</span> as a <a name="(tech._template._metafunction)"></a><span style="font-style: italic">template
metafunction</span>. A metafunction application in a <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._template%29%29" class="RktStxLink" data-pltdoc="x">template</a></span>
expression (but not a <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._syntax%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">syntax</a></span> expression) is evaluated by
applying the metafunction to the result of processing the “argument”
part of the template.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._define-template-metafunction%29%29" class="RktStxLink" data-pltdoc="x">define-template-metafunction</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">join</span><span class="hspace"> </span><span class="RktSym">stx</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktSym">stx</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym">join</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-patterns.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eoptional%29%29" class="RktStxLink" data-pltdoc="x">~optional</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-patterns.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktPn">#:lctx</span><span class="hspace"> </span><span class="RktSym">lctx</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">a:id</span><span class="hspace"> </span><span class="RktSym">b:id</span><span class="hspace"> </span><span class="RktMeta"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._datum-%7E3esyntax%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">datum->syntax</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=if.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._or%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">or</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-specifying.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._attribute%29%29" class="RktStxLink" data-pltdoc="x">attribute</a></span><span class="hspace"> </span><span class="RktSym">lctx</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktSym">a</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string-%7E3esymbol%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string->symbol</a></span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=procedures.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._apply%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">apply</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string-append%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string-append</a></span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fmap..rkt%2529._map%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">map</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=symbols.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._symbol-%7E3estring%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">symbol->string</a></span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-%7E3edatum%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">syntax->datum</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">a</span><span class="hspace"> </span><span class="RktSym">b</span><span class="hspace"> </span><span class="RktMeta"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktSym">stx</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._template%29%29" class="RktStxLink" data-pltdoc="x">template</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">join</span><span class="hspace"> </span><span class="RktSym">a</span><span class="hspace"> </span><span class="RktSym">b</span><span class="hspace"> </span><span class="RktSym">c</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#<syntax:206:0 abc></span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._with-syntax%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">with-syntax</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktMeta"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">a</span><span class="hspace"> </span><span class="RktSym">b</span><span class="hspace"> </span><span class="RktSym">c</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._template%29%29" class="RktStxLink" data-pltdoc="x">template</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">join</span><span class="hspace"> </span><span class="RktSym">tmp-</span><span class="hspace"> </span><span class="RktSym">x</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktMeta"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">#<syntax:207:0 ((a tmp-a) (b tmp-b) (c tmp-c))></span></p></td></tr></table></blockquote></td></tr></table></p><p>Metafunctions are useful for performing transformations in contexts
where macro expansion does not occur, such as binding occurrences. For
example:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-%7E3edatum%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">syntax->datum</a></span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._with-syntax%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">with-syntax</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">name</span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktSym">posn</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym">field</span><span class="hspace"> </span><span class="RktMeta"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktSym">y</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse%2Fexperimental%2Ftemplate..rkt%29._template%29%29" class="RktStxLink" data-pltdoc="x">template</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=let.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._let-values%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">let-values</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym">join</span><span class="hspace"> </span><span class="RktSym">name</span><span class="hspace"> </span><span class="RktSym">?</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">join</span><span class="hspace"> </span><span class="RktPn">#:lctx</span><span class="hspace"> </span><span class="RktSym">name</span><span class="hspace"> </span><span class="RktSym">make-</span><span class="hspace"> </span><span class="RktSym">name</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">join</span><span class="hspace"> </span><span class="RktSym">name</span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._-%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x"><span class="nobreak">-</span></a></span><span class="hspace"> </span><span class="RktSym">field</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktMeta"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=creatingmorestructs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._make-struct-type%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">make-struct-type</a></span><span class="hspace"> </span><span class="RktVar">__</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktVar">__</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'(let-values<span class="stt"> </span>(((posn?<span class="stt"> </span>make-posn<span class="stt"> </span>posn-x<span class="stt"> </span>posn-y)<span class="stt"> </span>(make-struct-type<span class="stt"> </span>__)))<span class="stt"> </span>__)</span></p></td></tr></table></blockquote><p>If <span class="RktSym">join</span> were defined as a macro, it would not be usable in
the context above; instead, <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=let.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._let-values%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">let-values</a></span> would report an
invalid binding list.</p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.1", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">top</a></span><span class="navright"> <a href="Debugging_and_Inspection_Tools.html" title="backward to "1.9 Debugging and Inspection Tools"" data-pltdoc="x">← prev</a> <a href="stxparse.html" title="up to "1 Parsing and Specifying Syntax"" data-pltdoc="x">up</a> <a href="syntax-helpers.html" title="forward to "2 Syntax Object Helpers"" data-pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html>
|