Fear of Macros
Copyright (c) 2012 by Greg Hendershott. All rights reserved.
4.1.1 "A pattern variable can’t be used outside of a template" |
1 Introduction
I learned Racket after 25 years of doing C/C++ imperative programming.
Some psychic whiplash resulted.
"All the parentheses" was actually not a big deal. Instead, the first +
Fear of Macros
1 Introduction
I learned Racket after 25 years of doing C/C++ imperative programming.
Some psychic whiplash resulted.
"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.
But two final frontiers remained: Macros and continuations.
I found that simple macros were easy and understandable, plus there diff --git a/main.rkt b/main.rkt index 5ec7231..ff07b37 100644 --- a/main.rkt +++ b/main.rkt @@ -1,7 +1,8 @@ #lang scribble/manual @(require racket/sandbox - scribble/eval) + scribble/eval + racket/date) @(define evaluator (parameterize ([sandbox-output 'string] [sandbox-error-output 'string]) @@ -10,10 +11,12 @@ @(define-syntax-rule (i body ...) (interaction #:eval evaluator body ...)) -@title{Fear of Macros} - +@title[#:version ""]{Fear of Macros} +@author{Greg Hendershott} @smaller{Copyright (c) 2012 by Greg Hendershott. All rights reserved.} - +@para[@smaller["Last updated " + (parameterize ([date-display-format 'iso-8601]) + (date->string (current-date) #t))]] @table-of-contents{}