<html><head><metahttp-equiv="content-type"content="text/html; charset=utf-8"/><title>7 Third tutorial</title><linkrel="stylesheet"type="text/css"href="scribble.css"title="default"/><linkrel="stylesheet"type="text/css"href="racket.css"title="default"/><linkrel="stylesheet"type="text/css"href="manual-style.css"title="default"/><linkrel="stylesheet"type="text/css"href="manual-racket.css"title="default"/><linkrel="stylesheet"type="text/css"href="mb.css"title="default"/><scripttype="text/javascript"src="scribble-common.js"></script><scripttype="text/javascript"src="manual-racket.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><bodyid="scribble-racket-lang-org"><divclass="tocset"><divclass="tocview"><divclass="tocviewlist tocviewlisttopspace"><divclass="tocviewtitle"><tablecellspacing="0"cellpadding="0"><tr><tdstyle="width: 1em;"><ahref="javascript:void(0);"title="Expand/Collapse"class="tocviewtoggle"onclick="TocviewToggle(this,"tocview_0");">▼</a></td><td></td><td><ahref="index.html"class="tocviewlink"data-pltdoc="x">Pollen:<spanclass="mywbr"> </span> the book is a program</a></td></tr></table></div><divclass="tocviewsublisttop"style="display: block;"id="tocview_0"><tablecellspacing="0"cellpadding="0"><tr><tdalign="right">1 </td><td><ahref="Installation.html"class="tocviewlink"data-pltdoc="x">Installation</a></td></tr><tr><tdalign="right">2 </td><td><ahref="quick-tour.html"class="tocviewlink"data-pltdoc="x">Quick tour</a></td></tr><tr><tdalign="right">3 </td><td><ahref="Backstory.html"class="tocviewlink"data-pltdoc="x">Backstory</a></td></tr><tr><tdalign="right">4 </td><td><ahref="big-picture.html"class="tocviewlink"data-pltdoc="x">The big picture</a></td></tr><tr><tdalign="right">5 </td><td><ahref="first-tutorial.html"class="tocviewlink"data-pltdoc="x">First tutorial</a></td></tr><tr><tdalign="right">6 </td><td><ahref="second-tutorial.html"class="tocviewlink"data-pltdoc="x">Second tutorial</a></td></tr><tr><tdalign="right">7 </td><td><ahref="third-tutorial.html"class="tocviewselflink"data-pltdoc="x">Third tutorial</a></td></tr><tr><tdalign="right">8 </td><td><ahref="raco-pollen.html"class="tocviewlink"data-pltdoc="x">Using <spanclass="stt">raco pollen</span></a></td></tr><tr><tdalign="right">9 </td><td><ahref="File_formats.html"class="tocviewlink"data-pltdoc="x">File formats</a></td></tr><tr><tdalign="right">10 </td><td><ahref="reader.html"class="tocviewlink"data-pltdoc="x">◊ command overview</a></td></tr><tr><tdalign="right">11 </td><td><ahref="Module_reference.html"class="tocviewlink"data-pltdoc="x">Module reference</a></td></tr><tr><tdalign="right">12 </td><td><ahref="Acknowledgments.html"class="tocviewlink"data-pltdoc="x">Acknowledgments</a></td></tr><tr><tdalign="right">13 </td><td><ahref="License___source_code.html"class="tocviewlink"data-pltdoc="x">License & source code</a></td></tr><tr><tdalign="right"></td><td><ahref="doc-index.html"class="tocviewlink"data-pltdoc="x">Index</a></td></tr></table></div></div><divclass="tocviewlist"><tablecellspacing="0"cellpadding="0"><tr><tdstyle="width: 1em;"><ahref="javascript:void(0);"title="Expand/Collapse"class="tocviewtoggle"onclick="TocviewToggle(this,"tocview_1");">►</a></td><td>7 </td><td><ahref="third-tutorial.html"class="tocviewselflink"data-pltdoc="x">Third tutorial</a></td></tr></table><divclass="tocviewsublistbottom"style="display: none;"id="tocview_1"><tablecellspacing="0"cellpadding="0"><tr><tdalign="right">7.1 </td><td><ahref="third-tutorial.html#%28part._tutorial-3._.Prerequisites%29"class="tocviewlink"data-pltdoc="x">Prerequisites</a></td></tr><tr><tdalign="right">7.2 </td><td><ahref="third-tutorial.html#%28part._.Pollen_markup_vs__.X.M.L%29"class="tocviewlink"data-pltdoc="x">Pollen markup vs. XML</a></td></tr><tr><tdalign="right">7.3 </td><td
Pollen won’t stop you from calling a function that returns an incompatible value, like <spanclass="RktSym"><ahref="http://docs.racket-lang.org/plot/plotting.html#%28def._%28%28lib._plot%2Fmain..rkt%29._plot%29%29"class="RktValLink"data-pltdoc="x">plot</a></span>, which returns a bitmap image:</p><divclass="fileblock"><divclass="SIntrapara"><divclass="fileblock_filetitle"><spanclass="fileblock_filename"><spanclass="stt">"article.html.pm"</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">◊</span><spanclass="RktPn">(</span><spanclass="RktSym"><ahref="http://docs.racket-lang.org/reference/require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29"class="RktStxLink"data-pltdoc="x">require</a></span><spanclass="RktMeta"></span><spanclass="hspace"> </span><spanclass="RktMeta"></span><spanclass="RktSym">math</span><spanclass="RktMeta"></span><spanclass="hspace"> </span><spanclass="RktMeta"></span><spanclass="RktSym"><ahref="http://docs.racket-lang.org/plot/plotting.html#%28def._%28%28lib._plot%2Fmain..rkt%29._plot%29%29"class="RktValLink"data-pltdoc="x">plot</a></span><spanclass="RktPn">)</span><spanclass="RktMeta"></span></td></tr><tr><td><spanclass="RktMeta"> </span></td></tr><tr><td><spanclass="RktMeta">Here</span><spanclass="RktVal">'</span><spanclass="RktMeta">s</span><spanclass="hspace"> </span><spanclass="RktMeta">a</span><spanclass="hspace"> </span><spanclass="RktMeta">sine</span><spanclass="hspace"> </span><spanclass="RktMeta">wave:</span></td></tr><tr><td><spanclass="RktMeta">◊</span><spanclass="RktPn">(</span><spanclass="RktSym"><ahref="http://docs.racket-lang.org/plot/plotting.html#%28def._%28%28lib._plot%2Fmain..rkt%29._plot%29%29"class="RktValLink"data-pltdoc="x">plot</a></span><spanclass="RktMeta"></span><spanclass="hspace"> </span><spanclass="RktMeta"></span><spanclass="RktPn">(</span><spanclass="RktSym"><ahref="http://docs.racket-lang.org/plot/renderer2d.html#%28def._%28%28lib._plot%2Fmain..rkt%29._function%29%29"class="RktValLink"data-pltdoc="x">function</a></span><spanclass="RktMeta"></span><spanclass="hspace"> </span><spanclass="RktMeta"></span><spanclass="RktSym"><ahref="http://docs.racket-lang.org/reference/generic-numbers.html#%28def._%28%28quote._~23~25kernel%29._sin%29%29"class="RktValLink"data-pltdoc="x">sin</a></span><spanclass="RktMeta"></span><spanclass="hspace"> </span><spanclass="RktMeta"></span><spanclass="RktPn">(</span><spanclass="RktSym"><ahref="http://docs.racket-lang.org/reference/generic-numbers.html#%28def._%28%28quote._~23~25kernel%29._-%29%29"class="RktValLink"data-pltdoc="x"><spanclass="nobreak">-</span></a></span><spanclass="RktMeta"></span><spanclass="hspace"> </span><spanclass="RktMeta"></span><spanclass="RktSym">pi</span><spanclass="RktPn">)</span><spanclass="RktMeta"></span><spanclass="hspace"> </span><spanclass="RktMeta"></span><spanclass="RktSym">pi</span><spanclass="RktMeta"></span><spanclass="hspace"> </span><spanclass="RktMeta"></span><spanclass="RktPn">#:label</span><spanclass="RktMeta"></span><spanclass="hspace"> </span><spanclass="RktMeta"></span><spanclass="RktVal">"y</span><spanclass="hspace"> </span><spanclass="RktVal">=</span><spanclass="hspace"> </span><spanclass="RktVal">sin(x)"</span><spanclass="RktPn">)</span><spanclass="RktPn">)</span><spanclass="RktMeta"></span></td></tr></table></blockquote></div></div></div></div><p>But it won’t work when you try to run it in DrRacket or load it in the project server.