Oh cool, I didn't know that existed. Thanks for sharing.
~Leif Andersen
On Tue, Sep 15, 2015 at 12:37 AM, Jens Axel Søgaard
wrote:
> FWIW an alternative to (let () ...) is block.
>
> http://docs.racket-lang.org/reference/block.html?q=block
>
> 2015-09-15 0:16 GMT+02:00 John Carmack :
>
>> Is t
FWIW an alternative to (let () ...) is block.
http://docs.racket-lang.org/reference/block.html?q=block
2015-09-15 0:16 GMT+02:00 John Carmack :
> Is there a deep reason why defines aren’t allowed in the branches of an
> if, but are for cond / while / unless?
>
>
>
> Wrapping code in (let() …) in
> Wrapping code in (let() …) instead of (begin …) works fine, but it is a
strange quirk to explain to someone else.
This is because begin actually does not create new scope in racket, where
as (let () ...) does.
Consider the following code:
#lang racket
(define (f x)
(begin
(define g 5))
On Sep 14, 2015, at 6:16 PM, John Carmack wrote:
> Is there a deep reason why defines aren’t allowed in the branches of an if,
> but are for cond / while / unless?
>
> Wrapping code in (let() …) instead of (begin …) works fine, but it is a
> strange quirk to explain to someone else.
It exp
Is there a deep reason why defines aren't allowed in the branches of an if, but
are for cond / while / unless?
Wrapping code in (let() ...) instead of (begin ...) works fine, but it is a
strange quirk to explain to someone else.
--
You received this message because you are subscribed to the Go
5 matches
Mail list logo