Matthias wrote:
What does tail-recursion modulo cons mean?
Some of my favourite academic paper titles:
Friedman and Wise, "CONS should not evaluate its arguments"
Baker, "CONS should not CONS its arguments"
--PR
Racket Users list:
http://lists.racket-lang.org/users
It would be trivial to add 'block' to make it backwards compatible.
On Mar 16, 2014, at 5:55 PM, Neil Van Dyke wrote:
> If some Racket people are going to advocate internal "define"s, maybe it's
> time to change "begin".
>
> (Telling people to use an empty "let" form so that they can use int
If some Racket people are going to advocate internal "define"s, maybe
it's time to change "begin".
(Telling people to use an empty "let" form so that they can use internal
"define" is funny.)
Neil V.
Racket Users list:
http://lists.racket-lang.org/users
This is the weekend, and I'm off the clock.
I think there is a balance to be achieved in advocacy/evanglism, but I
get tired of it, especially when it gets one hung up arguing minutiae
that people found boring years ago.
Are we really arguing about slowness, WITH JAVA PROGRAMMERS? (Do they
Hello all,
I'm still looking for anyone interested in giving a tutorial at the
March Racket Salon, tentatively slated for March 27th.
Alternatively, if anyone is interested in giving a talk about their
experience using Racket, please do get in touch!
On Mon, Mar 10, 2014 at 5:57 PM, Daniel King
Basically, avoiding growing the stack when building a list, by
compiling this program:
(define (list-id l)
(if (null? l) l
(cons (car l) (list-id (cdr l)
into this one:
(define (list-id* l acc)
(if (null? l)
(set-cdr! acc null)
(let ([p (cons (car l) #f)])
(set-cdr
I am developing a #lang with a custom reader and I'd like to use different
extension for it (rather than ".rkt").
However, this doesn't work with require forms like "require foo/bar" because
racket looks for foo/bar.rkt. Is there a way to tell racket about the extension
I wanted to use?
Thanks,
In Scheme you need to use (let () ...) in both if and cond to
introduce local definitions. That is
(cond [(even? x) (define y 42) (+ x y)]
[else 'huh])
will not work in Scheme, neither will
(cond [(even? x) (begin (define y 42) (+ x y))]
[else 'huh]).
To in
What does tail-recursion modulo cons mean?
On Mar 16, 2014, at 3:38 PM, Sam Tobin-Hochstadt wrote:
> On Sun, Mar 16, 2014 at 2:55 PM, Patrick Useldinger
> wrote:
>>
>>
>> My questions are:
>>
>> (1) Is Racket "tail-recursive modulo cons"? If not, is there a reason for
>> this?
>
> Racket
Ok, but why is "cond" defined to behave differently? I expected "cond" to
behave the same as "if".
Justin
On Mar 16, 2014 4:59 PM, "Jens Axel Søgaard" wrote:
> The problem is that begin does not introduce a new scope.
> You can use (let () ...) or block instead.
>
>
> http://docs.racket-lang.o
The problem is that begin does not introduce a new scope.
You can use (let () ...) or block instead.
http://docs.racket-lang.org/reference/block.html?q=block#%28form._%28%28lib._racket%2Fblock..rkt%29._block%29%29
/soegaard
2014-03-16 21:38 GMT+01:00 Justin Zamora :
> What is the reason for n
What is the reason for not allowing internal definitions in the "then" and
"else" parts of an "if"?
This fails with "define: not allowed in an expression context":
(if (< 3 4)
5
(begin
(define a 7)
a))
But the equivalent "cond" works fine:
(cond
[(< 3 4) 5]
[else (define a
If we want Racket to become used by more people in industry I think we should
include more information that addresses the misconceptions of many imperative
style programmers in industry that may push them away from developing in
Racket. Information that emphasizes why Racket is “practical”.
W
On Sun, Mar 16, 2014 at 2:55 PM, Patrick Useldinger
wrote:
>
>
> My questions are:
>
> (1) Is Racket "tail-recursive modulo cons"? If not, is there a reason for
> this?
Racket is not "tail-recursive modulo cons".
> (2) Is the last example "reverse free" or does it use reverse under the
> hood?
Greetings everybody,
Let's assume we want a procedure that doubles every even? number of a list.
The recursive way would be something like:
(require rackunit)
(define parms '(1 2 3 4 5))
(define result '(4 8))
(define (f-recursive lst)
(if (null? lst)
null
(let ((c (car lst)))
Yes, it works now.
Thanks, Matthew.
On Sun, Mar 16, 2014 at 8:26 PM, Matthew Flatt wrote:
> At Sun, 16 Mar 2014 14:44:27 +0800, WarGrey Gyoudmon Ju wrote:
> > Now I figure out that, git version is in its way to support class system
> in
> > Typed Racket,
> > but `raco install` via downloading
On 2014-03-16 06:16:59 -0600, Matthew Flatt wrote:
> After building a Racket base installation to , use
>
> make local-source-catalog RACKET=/bin/racket
>
> in the repo checkout's top-level directory.
>
> On Mac OS X, use `local-catalog` instead of `local-source-catalog` to
> include native-cod
At Sun, 16 Mar 2014 14:44:27 +0800, WarGrey Gyoudmon Ju wrote:
> Now I figure out that, git version is in its way to support class system in
> Typed Racket,
> but `raco install` via downloading only have the stable packages for
> stable versions.
Just to clarify, `raco pkg install` should work no
At Sun, 16 Mar 2014 01:25:26 -0400, Asumu Takikawa wrote:
> Is there a good way to do non-in-place installs with Racket from git
> HEAD?
>
> When this was brought up previously on the mailing list, it was
> suggested to build a base Racket install and then to use `raco pkg
> install` to install th
I found/fixed my problem, and I think it arose from (a) having the lang
files in two places in my filesystem, and (b) raco setup finding one copy
automatically.
raco setup is going into "My Documents\GitHub\" and attempting to make the
.rkt files it finds in there. I used to check out my lang fil
20 matches
Mail list logo