Merge branch 'master' into gh-pages
This commit is contained in:
commit
85b7d23325
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,2 +1,2 @@
|
|||
.DS_Store
|
||||
main.html
|
||||
index/
|
||||
|
|
9
Epilogue.html
Normal file
9
Epilogue.html
Normal file
File diff suppressed because one or more lines are too long
22
Our_plan_of_attack.html
Normal file
22
Our_plan_of_attack.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html><head><meta http-equiv="content-type" content="text-html; charset=utf-8" /><title>2 Our plan of attack</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="scribble-style.css" title="default" /><link rel="stylesheet" type="text/css" href="gh.css" title="default" /><script type="text/javascript" src="scribble-common.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--><meta name="keywords" content="Racket,macros,Scheme"><meta name="description" content="Practical Racket macros"><meta name="author" content="Greg Hendershott"><meta name="charset" content="utf-8"><link href='http://fonts.googleapis.com/css?family=Fenix' rel='stylesheet' type='text/css'><script type="text/javascript">var _gaq = _gaq || [];_gaq.push(['_setAccount', 'UA-29709446-1']);_gaq.push(['_setDomainName', 'greghendershott.com']);_gaq.push(['_trackPageview']);(function() {var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();</script></head><body id="scribble-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist" style="margin-bottom: 1em;"><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" pltdoc="x">Fear of Macros</a></td></tr></table></div><div class="tocviewsublistonly" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="Preface.html" class="tocviewlink" pltdoc="x">Preface</a></td></tr><tr><td align="right">2 </td><td><a href="" class="tocviewselflink" pltdoc="x">Our plan of attack</a></td></tr><tr><td align="right">3 </td><td><a href="Transform_.html" class="tocviewlink" pltdoc="x">Transform!</a></td></tr><tr><td align="right">4 </td><td><a href="pattern-matching.html" class="tocviewlink" pltdoc="x">Pattern matching:<span class="mywbr"> </span> syntax-<wbr></wbr>case and syntax-<wbr></wbr>rules</a></td></tr><tr><td align="right">5 </td><td><a href="Syntax_parameters.html" class="tocviewlink" pltdoc="x">Syntax parameters</a></td></tr><tr><td align="right">6 </td><td><a href="What_s_the_point_of_splicing-let_.html" class="tocviewlink" pltdoc="x">What’s the point of <span class="RktSym"><span class="RktStxLink">splicing-<wbr></wbr>let</span></span>?</a></td></tr><tr><td align="right">7 </td><td><a href="Robust_macros__syntax-parse.html" class="tocviewlink" pltdoc="x">Robust macros:<span class="mywbr"> </span> syntax-<wbr></wbr>parse</a></td></tr><tr><td align="right">8 </td><td><a href="References_and_Acknowledgments.html" class="tocviewlink" pltdoc="x">References and Acknowledgments</a></td></tr><tr><td align="right">9 </td><td><a href="Epilogue.html" class="tocviewlink" pltdoc="x">Epilogue</a></td></tr></table></div></div></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"> </span><span class="navright"><a href="Preface.html" title="backward to "1 Preface"" pltdoc="x">← prev</a> <a href="index.html" title="up to "Fear of Macros"" pltdoc="x">up</a> <a href="Transform_.html" title="forward to "3 Transform!"" pltdoc="x">next →</a></span> </div><h3>2<tt> </tt><a name="(part._.Our_plan_of_attack)"></a>Our plan of attack</h3><p>The macro system you will mostly want to use for production-quality
|
||||
macros is called <span class="RktSym"><a href="http://docs.racket-lang.org/syntax/Parsing_Syntax.html#(form._((lib._syntax%2Fparse..rkt)._syntax-parse))" class="RktStxLink" pltdoc="x">syntax-parse</a></span>. And don’t worry, we’ll get to
|
||||
that soon.</p><p>But if we start there, you’re likely to feel overwhelmed by concepts
|
||||
and terminology, and get very confused. I did.</p><p>1. Instead let’s start with the basics: A syntax object and a function
|
||||
to change it—<wbr></wbr>a "transformer". We’ll work at that level for awhile to
|
||||
get comfortable and to de-mythologize this whole macro business.</p><p>2. Soon we’ll realize that pattern-matching would make life
|
||||
easier. We’ll learn about <span class="RktSym"><a href="http://docs.racket-lang.org/reference/stx-patterns.html#(form._((lib._racket%2Fprivate%2Fstxcase-scheme..rkt)._syntax-case))" class="RktStxLink" pltdoc="x">syntax-case</a></span> and its shorthand
|
||||
cousin, <span class="RktSym"><a href="http://docs.racket-lang.org/reference/stx-patterns.html#(form._((lib._racket%2Fprivate%2Fmisc..rkt)._define-syntax-rule))" class="RktStxLink" pltdoc="x">define-syntax-rule</a></span>. We’ll discover we can get
|
||||
confused if we want to munge pattern variables before sticking them
|
||||
back in the template, and learn how to do that.</p><p>3. At this point we’ll be able to write many useful macros. But, what
|
||||
if we want to write the ever-popular anaphoric if, with a "magic
|
||||
variable"? It turns out we’ve been protected from making certain kind
|
||||
of mistakes. When we want to do this kind of thing on purpose, we use
|
||||
a syntax parameter. [There are other, older ways to do this. We won’t
|
||||
look at them. We also won’t spend a lot of time
|
||||
advocating "hygiene"—<wbr></wbr>we’ll just stipulate that it’s good.]</p><p>4. Finally, we’ll realize that our macros could be smarter when
|
||||
they’re used in error. Normal Racket functions optionally can have
|
||||
contracts and types. These catch usage mistakes and provide clear,
|
||||
useful error messages. It would be great if there were something
|
||||
similar for macro. There is. One of the more-recent Racket macro
|
||||
enhancements is <span class="RktSym"><a href="http://docs.racket-lang.org/syntax/Parsing_Syntax.html#(form._((lib._syntax%2Fparse..rkt)._syntax-parse))" class="RktStxLink" pltdoc="x">syntax-parse</a></span>.</p><div class="navsetbottom"><span class="navleft"> </span><span class="navright"><a href="Preface.html" title="backward to "1 Preface"" pltdoc="x">← prev</a> <a href="index.html" title="up to "Fear of Macros"" pltdoc="x">up</a> <a href="Transform_.html" title="forward to "3 Transform!"" pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html>
|
24
Preface.html
Normal file
24
Preface.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 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 Preface</title><link rel="stylesheet" type="text/css" href="scribble.css" title="default" /><link rel="stylesheet" type="text/css" href="scribble-style.css" title="default" /><link rel="stylesheet" type="text/css" href="gh.css" title="default" /><script type="text/javascript" src="scribble-common.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--><meta name="keywords" content="Racket,macros,Scheme"><meta name="description" content="Practical Racket macros"><meta name="author" content="Greg Hendershott"><meta name="charset" content="utf-8"><link href='http://fonts.googleapis.com/css?family=Fenix' rel='stylesheet' type='text/css'><script type="text/javascript">var _gaq = _gaq || [];_gaq.push(['_setAccount', 'UA-29709446-1']);_gaq.push(['_setDomainName', 'greghendershott.com']);_gaq.push(['_trackPageview']);(function() {var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();</script></head><body id="scribble-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist" style="margin-bottom: 1em;"><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" pltdoc="x">Fear of Macros</a></td></tr></table></div><div class="tocviewsublistonly" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="" class="tocviewselflink" pltdoc="x">Preface</a></td></tr><tr><td align="right">2 </td><td><a href="Our_plan_of_attack.html" class="tocviewlink" pltdoc="x">Our plan of attack</a></td></tr><tr><td align="right">3 </td><td><a href="Transform_.html" class="tocviewlink" pltdoc="x">Transform!</a></td></tr><tr><td align="right">4 </td><td><a href="pattern-matching.html" class="tocviewlink" pltdoc="x">Pattern matching:<span class="mywbr"> </span> syntax-<wbr></wbr>case and syntax-<wbr></wbr>rules</a></td></tr><tr><td align="right">5 </td><td><a href="Syntax_parameters.html" class="tocviewlink" pltdoc="x">Syntax parameters</a></td></tr><tr><td align="right">6 </td><td><a href="What_s_the_point_of_splicing-let_.html" class="tocviewlink" pltdoc="x">What’s the point of <span class="RktSym"><span class="RktStxLink">splicing-<wbr></wbr>let</span></span>?</a></td></tr><tr><td align="right">7 </td><td><a href="Robust_macros__syntax-parse.html" class="tocviewlink" pltdoc="x">Robust macros:<span class="mywbr"> </span> syntax-<wbr></wbr>parse</a></td></tr><tr><td align="right">8 </td><td><a href="References_and_Acknowledgments.html" class="tocviewlink" pltdoc="x">References and Acknowledgments</a></td></tr><tr><td align="right">9 </td><td><a href="Epilogue.html" class="tocviewlink" pltdoc="x">Epilogue</a></td></tr></table></div></div></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"> </span><span class="navright"><a href="index.html" title="backward to "Fear of Macros"" pltdoc="x">← prev</a> <a href="index.html" title="up to "Fear of Macros"" pltdoc="x">up</a> <a href="Our_plan_of_attack.html" title="forward to "2 Our plan of attack"" pltdoc="x">next →</a></span> </div><h3>1<tt> </tt><a name="(part._.Preface)"></a>Preface</h3><p>I learned Racket after 25 years of mostly using C and C++.</p><p>Some psychic whiplash resulted.</p><p>"All the parentheses" was actually not a big deal. Instead, the first
|
||||
mind warp was functional programming. Before long I wrapped my brain
|
||||
around it, and went on to become comfortable and effective with many
|
||||
other aspects and features of Racket.</p><p>But two final frontiers remained: Macros and continuations.</p><p>I found that simple macros were easy and understandable, plus there
|
||||
were many good tutorials available. But the moment I stepped past
|
||||
routine pattern-matching, I kind of fell off a cliff into a
|
||||
terminology soup. I marinaded myself in material, hoping it would
|
||||
eventually sink in after enough re-readings. I even found myself using
|
||||
trial and error, rather than having a clear mental model what was
|
||||
going on. Gah.</p><p>I’m starting to write this at the point where the shapes are slowly
|
||||
emerging from the fog.</p><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p>If you have any corrections, criticisms, complaints, or whatever,
|
||||
<a href="https://github.com/greghendershott/fear-of-macros/issues">please
|
||||
let me know</a>.</p></blockquote></blockquote></blockquote><p>My primary motive is selfish. Explaining something forces me to learn
|
||||
it more thoroughly. Plus if I write something with mistakes, other
|
||||
people will be eager to point them out and correct me. Is that a
|
||||
social-engineering variation of meta-programming? Next question,
|
||||
please. :)</p><p>Finally I do hope it may help other people who have a similar
|
||||
background and/or learning style as me.</p><p>I want to show how Racket macro features have evolved as solutions to
|
||||
problems or annoyances. I learn more quickly and deeply when I
|
||||
discover the answer to a question I already have, or find the solution
|
||||
to a problem whose pain I already feel. Therefore I’ll give you the
|
||||
questions and problems first, so that you can better appreciate and
|
||||
understand the answers and solutions.</p><div class="navsetbottom"><span class="navleft"> </span><span class="navright"><a href="index.html" title="backward to "Fear of Macros"" pltdoc="x">← prev</a> <a href="index.html" title="up to "Fear of Macros"" pltdoc="x">up</a> <a href="Our_plan_of_attack.html" title="forward to "2 Our plan of attack"" pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html>
|
34
References_and_Acknowledgments.html
Normal file
34
References_and_Acknowledgments.html
Normal file
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html><head><meta http-equiv="content-type" content="text-html; charset=utf-8" /><title>8 References and Acknowledgments</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="scribble-style.css" title="default" /><link rel="stylesheet" type="text/css" href="gh.css" title="default" /><script type="text/javascript" src="scribble-common.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--><meta name="keywords" content="Racket,macros,Scheme"><meta name="description" content="Practical Racket macros"><meta name="author" content="Greg Hendershott"><meta name="charset" content="utf-8"><link href='http://fonts.googleapis.com/css?family=Fenix' rel='stylesheet' type='text/css'><script type="text/javascript">var _gaq = _gaq || [];_gaq.push(['_setAccount', 'UA-29709446-1']);_gaq.push(['_setDomainName', 'greghendershott.com']);_gaq.push(['_trackPageview']);(function() {var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();</script></head><body id="scribble-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist" style="margin-bottom: 1em;"><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" pltdoc="x">Fear of Macros</a></td></tr></table></div><div class="tocviewsublistonly" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="Preface.html" class="tocviewlink" pltdoc="x">Preface</a></td></tr><tr><td align="right">2 </td><td><a href="Our_plan_of_attack.html" class="tocviewlink" pltdoc="x">Our plan of attack</a></td></tr><tr><td align="right">3 </td><td><a href="Transform_.html" class="tocviewlink" pltdoc="x">Transform!</a></td></tr><tr><td align="right">4 </td><td><a href="pattern-matching.html" class="tocviewlink" pltdoc="x">Pattern matching:<span class="mywbr"> </span> syntax-<wbr></wbr>case and syntax-<wbr></wbr>rules</a></td></tr><tr><td align="right">5 </td><td><a href="Syntax_parameters.html" class="tocviewlink" pltdoc="x">Syntax parameters</a></td></tr><tr><td align="right">6 </td><td><a href="What_s_the_point_of_splicing-let_.html" class="tocviewlink" pltdoc="x">What’s the point of <span class="RktSym"><span class="RktStxLink">splicing-<wbr></wbr>let</span></span>?</a></td></tr><tr><td align="right">7 </td><td><a href="Robust_macros__syntax-parse.html" class="tocviewlink" pltdoc="x">Robust macros:<span class="mywbr"> </span> syntax-<wbr></wbr>parse</a></td></tr><tr><td align="right">8 </td><td><a href="" class="tocviewselflink" pltdoc="x">References and Acknowledgments</a></td></tr><tr><td align="right">9 </td><td><a href="Epilogue.html" class="tocviewlink" pltdoc="x">Epilogue</a></td></tr></table></div></div></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"> </span><span class="navright"><a href="Robust_macros__syntax-parse.html" title="backward to "7 Robust macros: syntax-parse"" pltdoc="x">← prev</a> <a href="index.html" title="up to "Fear of Macros"" pltdoc="x">up</a> <a href="Epilogue.html" title="forward to "9 Epilogue"" pltdoc="x">next →</a></span> </div><h3>8<tt> </tt><a name="(part._.References_and_.Acknowledgments)"></a>References and Acknowledgments</h3><p>Eli Barzliay’s blog post,
|
||||
<a href="http://blog.racket-lang.org/2011/04/writing-syntax-case-macros.html">Writing
|
||||
‘syntax-case’ Macros</a>, helped me understand many key details and
|
||||
concepts. It also inspired me to use a "bottom-up" approach. However
|
||||
he wrote for a specific audience. If you’re not already familiar with
|
||||
un-hygienic defmacro style macros, it may seem slightly weird to the
|
||||
extent it’s trying to convince you to change an opinion you don’t
|
||||
have. I’m writing for people who don’t have any opinion about macros
|
||||
at all, except maybe that macros seem scary and daunting.</p><p>Eli wrote another blog post,
|
||||
<a href="http://blog.racket-lang.org/2008/02/dirty-looking-hygiene.html">Dirty
|
||||
Looking Hygiene</a>, which explains syntax-parameterize. I relied
|
||||
heavily on that, mostly just updating it since his post was written
|
||||
before PLT Scheme was renamed to Racket.</p><p>Matthew Flatt’s
|
||||
<a href="http://www.cs.utah.edu/plt/publications/macromod.pdf">Composable
|
||||
and Compilable Macros: You Want it When?</a> explains how Racket handles
|
||||
compile time vs. run time.</p><p><a href="http://www.scheme.com/tspl4/syntax.html#./syntax:h0">Chapter
|
||||
8</a> of <span style="font-style: italic">The Scheme Programming Language</span> by Kent Dybvig
|
||||
explains <span class="RktSym"><a href="http://docs.racket-lang.org/reference/stx-patterns.html#(form._((lib._racket%2Fprivate%2Fstxcase-scheme..rkt)._syntax-rules))" class="RktStxLink" pltdoc="x">syntax-rules</a></span> and <span class="RktSym"><a href="http://docs.racket-lang.org/reference/stx-patterns.html#(form._((lib._racket%2Fprivate%2Fstxcase-scheme..rkt)._syntax-case))" class="RktStxLink" pltdoc="x">syntax-case</a></span>. Although
|
||||
more "formal" in tone, you may find it helpful to read it. You never
|
||||
know which explanation or examples of something will click for you.</p><p>After initially wondering if I was asking the wrong question and
|
||||
conflating two different issues :), Shriram Krishnamurthi looked at an
|
||||
early draft and encouraged me to keep going. Sam Tobin-Hochstadt and
|
||||
Robby Findler also encouraged me. Matthew Flatt showed me how to make
|
||||
a Scribble <span class="RktSym">interaction</span> print <span class="RktSym"><a href="http://docs.racket-lang.org/reference/stx-patterns.html#(form._((lib._racket%2Fprivate%2Fstxcase-scheme..rkt)._syntax))" class="RktStxLink" pltdoc="x">syntax</a></span> as
|
||||
<span class="RktVal">"syntax"</span> rather than as <span class="RktVal">"#'"</span>. Jay McCarthy helped me
|
||||
catch some mistakes and confusions. Jon Rafkind pointed out some
|
||||
problems. Kieron Hardy reported a font issue and some typos.</p><p>Finally, I noticed something strange. After writing much of this, when
|
||||
I returned to some parts of the Racket documentation, I noticed it had
|
||||
improved since I last read it. Of course, it was the same. I’d
|
||||
changed. It’s interesting how much of what we already know is
|
||||
projected between the lines. My point is, the Racket documentation is
|
||||
very good. The <span style="font-style: italic">Guide</span> provides helpful examples and
|
||||
tutorials. The <span style="font-style: italic">Reference</span> is very clear and precise.</p><div class="navsetbottom"><span class="navleft"> </span><span class="navright"><a href="Robust_macros__syntax-parse.html" title="backward to "7 Robust macros: syntax-parse"" pltdoc="x">← prev</a> <a href="index.html" title="up to "Fear of Macros"" pltdoc="x">up</a> <a href="Epilogue.html" title="forward to "9 Epilogue"" pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html>
|
31
Robust_macros__syntax-parse.html
Normal file
31
Robust_macros__syntax-parse.html
Normal file
File diff suppressed because one or more lines are too long
24
Syntax_parameters.html
Normal file
24
Syntax_parameters.html
Normal file
File diff suppressed because one or more lines are too long
102
Transform_.html
Normal file
102
Transform_.html
Normal file
File diff suppressed because one or more lines are too long
11
What_s_the_point_of_splicing-let_.html
Normal file
11
What_s_the_point_of_splicing-let_.html
Normal file
File diff suppressed because one or more lines are too long
|
@ -41,9 +41,15 @@ EOF
|
|||
(define all (string-append metas web-font ga-code </head>))
|
||||
(define subst (regexp-replace* "\n" all "")) ;minify
|
||||
|
||||
(define old (file->string "main.html"))
|
||||
(define new (regexp-replace "</head>" old subst))
|
||||
(with-output-to-file (build-path 'same "index.html")
|
||||
(lambda () (display new))
|
||||
#:mode 'text
|
||||
#:exists 'replace)
|
||||
(define (do-file path)
|
||||
(define old (file->string path))
|
||||
(define new (regexp-replace </head> old subst))
|
||||
(with-output-to-file path
|
||||
(lambda () (display new))
|
||||
#:mode 'text
|
||||
#:exists 'replace))
|
||||
|
||||
(for ([path (find-files (lambda (path)
|
||||
(regexp-match? #rx"\\.html" path))
|
||||
(build-path 'same "index"))])
|
||||
(do-file path))
|
||||
|
|
364
index.html
364
index.html
File diff suppressed because one or more lines are too long
|
@ -606,7 +606,7 @@ them available at compile time.}
|
|||
@; ----------------------------------------------------------------------------
|
||||
@; ----------------------------------------------------------------------------
|
||||
|
||||
@section{Pattern matching: syntax-case and syntax-rules}
|
||||
@section[#:tag "pattern-matching"]{Pattern matching: syntax-case and syntax-rules}
|
||||
|
||||
Most useful syntax transformers work by taking some input syntax, and
|
||||
rearranging the pieces into something else. As we saw, this is
|
||||
|
@ -1493,8 +1493,8 @@ great. Improving it would require even more error code.
|
|||
(string-append s " snazzy suffix"))
|
||||
;; User of the function:
|
||||
(misuse 0)
|
||||
;; I goofed, and understand why! I hear the writer of the function is
|
||||
;; happier.
|
||||
;; I goofed, and understand why! I'm happier, and I hear the writer of
|
||||
;; the function is happier, too.
|
||||
)
|
||||
|
||||
This is the best of both worlds.
|
|
@ -1,2 +1,3 @@
|
|||
scribble --html ++style gh.css ++xref-in setup/xref load-collections-xref --redirect-main "http://docs.racket-lang.org/" main.rkt
|
||||
scribble --htmls ++style gh.css ++xref-in setup/xref load-collections-xref --redirect-main "http://docs.racket-lang.org/" index.rkt
|
||||
racket add-to-head.rkt
|
||||
cp index/ ./
|
||||
|
|
121
pattern-matching.html
Normal file
121
pattern-matching.html
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user