Re: [racket-users] Re: Setting parameters between files does not work as expected

2017-04-24 Thread Jack Firth
Whoops! That's what I get for assuming Racket makes the same mistake that
Python does :)

On Mon, Apr 24, 2017 at 1:58 PM, Sam Tobin-Hochstadt 
wrote:

> On Mon, Apr 24, 2017 at 4:43 PM, Jack Firth  wrote:
> > Default values for function arguments are computed once when the
> function is defined, not each time the function is called. You'll want to
> make the defaults all false and get the parameter values inside the
> function body.
>
> This is not accurate about default arguments -- they are evaluated
> every time. See this example: http://pasterack.org/pastes/65766
>
> Sam
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Re: Setting parameters between files does not work as expected

2017-04-24 Thread Sam Tobin-Hochstadt
On Mon, Apr 24, 2017 at 4:43 PM, Jack Firth  wrote:
> Default values for function arguments are computed once when the function is 
> defined, not each time the function is called. You'll want to make the 
> defaults all false and get the parameter values inside the function body.

This is not accurate about default arguments -- they are evaluated
every time. See this example: http://pasterack.org/pastes/65766

Sam

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Setting parameters between files does not work as expected

2017-04-24 Thread Jack Firth
Default values for function arguments are computed once when the function is 
defined, not each time the function is called. You'll want to make the defaults 
all false and get the parameter values inside the function body.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.