</div><divclass="SIntrapara"><ul><li><p>inserting <spanclass="stt">#lang pollen</span> as the first line,</p></li><li><p>adding the <spanclass="stt">.pp</span> file extension,</p></li><li><p>running it through Pollen.</p></li></ul></div></p><blockquoteclass="refpara"><blockquoteclass="refcolumn"><blockquoteclass="refcontent"><p>For more about the Pollen processing modes and how to invoke them, see <ahref="file-types.html"data-pltdoc="x">File</a>.</p></blockquote></blockquote></blockquote><p>“The preprocessor be used with <spanstyle="font-weight: bold">any</span> kind of text-based file?” Right. “But how?” The preprocessor reads the source file, handles any Pollen commands it finds, and lets the rest of the content pass through untouched. To the preprocessor, it’s all just text data. It doesn’t care whether that text represents HTML, CSS, JavaScript, or even <ahref="https://en.wikipedia.org/wiki/TI-BASIC">TI-BASIC</a>.</p><p>One caveat: because the preprocessor only deals with text, the Pollen commands you use in the preprocessor also have to produce text. Moreover, Pollen doesn’t enforce the syntax rules of the underlying file — that’s your responsibility. For instance, Pollen won’t stop you from doing nonsensical things like this:</p><divclass="fileblock"><divclass="SIntrapara"><divclass="fileblock_filetitle"><spanclass="fileblock_filename"><spanclass="stt">"bad-poem.html.pp"</span></span></div></div><divclass="SIntrapara"><divclass="fileblock_filecontent"><divclass="SIntrapara"><blockquoteclass="SCodeFlow"><tablecellspacing="0"cellpadding="0"class="RktBlk"><tr><td><spanclass="RktMeta">#lang</span><spanclass="hspace"> </span><spanclass="RktMeta"></span><ahref="index.html"class="RktModLink"data-pltdoc="x"><spanclass="RktSym">pollen</span></a><spanclass="RktMeta"></span></td></tr><tr><td><spanclass="RktMeta"> </span></td></tr><tr><td><spanclass="RktMeta">The</span><spanclass="hspace"> </span><spanclass="RktMeta">cave</span><spanclass="hspace"> </span><spanclass="RktMeta">is</span><spanclass="hspace"> </span><spanclass="RktMeta">pitch</span><spanclass="hspace"> </span><spanclass="RktMeta">black.</span></td></tr><tr><td><spanclass="RktMeta">Look</span><spanclass="hspace"> </span><spanclass="RktMeta">out</span><spanclass="hspace"> </span><spanclass="RktMeta">for</span><spanclass="hspace"> </span><spanclass="RktMeta">the</span><spanclass="hspace"> </span><spanclass="RktMeta">grue.</span></td></tr><tr><td><spanclass="RktMeta">◊</span><spanclass="RktPn">(</span><spanclass="RktSym">insert-mp3-recording-of-scream</span><spanclass="RktPn">)</span><spanclass="RktMeta"></span></td></tr></table></blockquote></div></div></div></div><p>Pollen will fulfill your request, but the result won’t be valid HTML, because you can’t simply drop binary data in the middle of an HTML file. To paraphrase Mr. Babbage — garbage in, garbage out.</p><p>I’ve encouraged you to mess with the source file, but let’s return it to its original state:</p><divclass="fileblock"><divclass="SIntrapara"><divclass="fileblock_filetitle"><spanclass="fileblock_filename"><spanclass="stt">"/path/to/tutorial/poem.html.pp"</span></span></div></div><divclass="SIntrapara"><divclass="fileblock_filecontent"><divclass="SIntrapara"><blockquoteclass="SCodeFlow"><tablecellspacing="0"cellpadding="0"class="RktBlk"><tr><td><spanclass="RktMeta">#lang</span><spanclass="hspace"> </span><spanclass="RktMeta"></span><ahref="index.html"class="RktModLink"data-pltdoc="x"><spanclass="RktSym">pollen</span></a><spanclass="RktMeta"></span></td></tr><tr><td><spanclass="RktMeta"> </span></td></tr><tr><td><spanclass="RktMeta">The</span><spanclass="hspace"> </span><spanclass="RktMeta">margin</span><spanclass="hspace"> </span><spanclass="RktMeta">is</span><spanclass="hspace"> </span><spanclass="RktMeta">42em.</span></td></tr><tr><td><spanclass="RktMeta"
<br/><spanstyle="font-weight: bold">Ubuntu</span>: ctrl + shift + U, then 25CA</p><h5>5.5.4<tt> </tt><aname="(part._.Racket_basics__if_you_re_not_familiar_)"></a>Racket basics (if you’re not familiar)</h5><p>“But I’ve never used Racket.” Today, you start. Here are the five basic rules of Racket:</p><ol><li><p>The core building block of Racket is the <spanstyle="font-style: italic">expression</span>. An expression can be a value (like <spanclass="RktVal">2</span> or <spanclass="RktVal">"blue"</span>), a variable (like <spanclass="stt">edge</span>), or a function call (like <spanclass="RktPn">(</span><spanclass="RktSym">*</span><spanclass="stt"></span><spanclass="RktSym">inner</span><spanclass="stt"></span><spanclass="RktVal">4</span><spanclass="RktPn">)</span>).</p></li><li><p>Every expression is <spanstyle="font-style: italic">evaluated</span> to produce a value.</p></li><li><p>A variable evaluates to whatever value it holds (so <spanclass="stt">inner</span> would become <spanclass="RktVal">2</span>). A function call evaluates to its return value (so <spanclass="RktPn">(</span><spanclass="RktSym">+</span><spanclass="stt"></span><spanclass="RktVal">1</span><spanclass="stt"></span><spanclass="RktVal">1</span><spanclass="RktPn">)</span> would become <spanclass="RktVal">2</span>).</p></li><li><p>Function calls go between parentheses. Unlike most languages, the function name comes <spanstyle="font-style: italic">first</span>, followed by its arguments (so it’s <spanclass="RktPn">(</span><spanclass="RktSym">*</span><spanclass="stt"></span><spanclass="RktSym">inner</span><spanclass="stt"></span><spanclass="RktVal">4</span><spanclass="RktPn">)</span>, not <spanclass="RktPn">(</span><spanclass="RktSym">inner</span><spanclass="stt"></span><spanclass="RktSym">*</span><spanclass="stt"></span><spanclass="RktVal">4</span><spanclass="RktPn">)</span>). This is called <spanstyle="font-style: italic">prefix notation</span>.</p></li><li><p>Expressions can contain recursively nested expressions. Thus, <spanclass="RktPn">(</span><spanclass="RktSym">*</span><spanclass="stt"></span><spanclass="RktSym">inner</span><spanclass="stt"></span><spanclass="RktVal">4</span><spanclass="RktPn">)</span> could be written <spanclass="RktPn">(</span><spanclass="RktSym">*</span><spanclass="stt"></span><spanclass="RktSym">inner</span><spanclass="stt"></span><spanclass="RktPn">(</span><spanclass="RktSym">+</span><spanclass="stt"></span><spanclass="RktVal">2</span><spanclass="stt"></span><spanclass="RktVal">2</span><spanclass="RktPn">)</span><spanclass="RktPn">)</span> or <spanclass="RktPn">(</span><spanclass="RktSym">*</span><spanclass="stt"></span><spanclass="RktSym">inner</span><spanclass="stt"></span><spanclass="RktPn">(</span><spanclass="RktSym">+</span><spanclass="stt"></span><spanclass="RktPn">(</span><spanclass="RktSym">+</span><spanclass="stt"></span><spanclass="RktVal">1</span><spanclass="stt"></span><spanclass="RktVal">1</span><spanclass="RktPn">)</span><spanclass="stt"></span><spanclass="RktPn">(</span><spanclass="RktSym">+</span><spanclass="stt"></span><spanclass="RktVal">1</span><spanclass="stt"></span><spanclass="RktVal">1</span><spanclass="RktPn">)</span><spanclass="RktPn">)</span><spanclass="RktPn">)</span>.</p></li></ol><blockquoteclass="refpara"><blockquoteclass="refcolumn"><blockquoteclass="refcontent"><p>Newcomers to Racket often gripe about prefix notation and the parentheses. If you need to get it out of your system, go ahead. Keep in mind, however, that it’s not some peculiar affectation, but rather a necessary consequence of rule #1. As you’ll come to learn, rule #1 is where the magic happens.</p></blockquote></blockquote></blockquote><p>That should tell you enough to infer what’s going on in the Pollen commands above:</p><blockquoteclass="SCodeFlow"><tablecellspacing="0"cellpadding="0"class="RktBlk"><tr><td><spanclass="RktMeta">#lang</span><spanclass="hspace"> </sp