Re: [racket-users] one-source-file package format

2016-03-13 Thread Vincent St-Amour
On Sat, 12 Mar 2016 15:51:44 -0600, Matthias Felleisen wrote: > > On Mar 12, 2016, at 1:22 PM, Jay McCarthy > wrote: > > > For my taste, I don't want to run any program on my files to "turn > them into real Racket". > > I think you already are running programs on your Rack

Re: [racket-users] Re: Pattern Matching in Macros | Meaning of dot

2016-03-13 Thread Jens Axel Søgaard
If we use (define-syntax define/memoized (syntax-rules () ((_ (name . args) . body) (define name (memoize (lambda args body)) and body is bound to((displayln x) (displayln y) (displayz)) then (lambda args body) will become (lambda ((displayln x) (displayln y) (dis

[racket-users] Re: Pattern Matching in Macros | Meaning of dot

2016-03-13 Thread Pedro Caldeira
Sorry I've messed up my reply, here's the actual reply >Imagine (_ (foo x y z) (displayln x) (displayln y) (displayln z)) as the >actual syntax. The .body will be bound to the sequence of three diaplaylns and >this sequence will become the body of the lambda in the expansion. So in this case bod

Re: [racket-users] Pattern Matching in Macros | Meaning of dot

2016-03-13 Thread Pedro Caldeira
>Imagine (_ (foo x y z) (displayln x) (displayln y) (displayln z)) as the >actual syntax. The .body will be bound to the sequence of three diaplaylns and >this sequence will become the body of the lambda in the expansion. So in this case body will be bound to the list ((displayln x) (displayln y

Re: [racket-users] Pattern Matching in Macros | Meaning of dot

2016-03-13 Thread Jens Axel Søgaard
The cons cell constructed by (cons 1 2) is normally printed as (1 . 2). The list created by (list 1 2 3) could also be created as (cons 1 (cons 2 (cons 3 '(. It could be printed as (1 . (2 . (3 . (. Normally lists are simply printed as (1 2 3) though. Notice that (1 . (list 2 3)) is the s

RE: [racket-users] Pattern Matching in Macros | Meaning of dot

2016-03-13 Thread Jos Koot
Consider (define/memoized (a b c d) form0 form1 form2) . body allows the body to consist of more than one form. Without the dot, syntax define/memoized would accept bodies of one form only, that is (define/memoized (a b c d) form0) would match, but (define/memoized (a b c d) form0 form1 form2) woul

Re: [racket-users] Pattern Matching in Macros | Meaning of dot

2016-03-13 Thread Matthias Felleisen
> On Mar 13, 2016, at 11:05 AM, Pedro Caldeira > wrote: > > Hello everyone, > > Since I've discovered the concept of metaprogramming I've been quite > interested in Racket and its syntax extension capabilities. > > While searching for a memoization syntax extension I found a macro whose > p

[racket-users] Pattern Matching in Macros | Meaning of dot

2016-03-13 Thread Pedro Caldeira
Hello everyone, Since I've discovered the concept of metaprogramming I've been quite interested in Racket and its syntax extension capabilities. While searching for a memoization syntax extension I found a macro whose pattern extension remained unclear. (define-syntax define/memoized (syntax