On Sat, 01 Oct 2016 15:44:18 -0500,
Angus wrote:
> 
> And it is now more obvious to me that in:
> 
> (define (bigger w)
>   (interval (min (interval-big w) 
>                  (add1 (guess w)))
>             (interval-big w) (+ (interval-guesses w) 1)))
> 
> The (interval... part is a constructor ? for an interval and that is
> what this function returns - the new state of the world.

Precisely. Welcome to functional programming. :)

> It's interesting here that there is no assignment as such.  Although
> big-bang must somehow be dealing with mutating internal state
> somehow.

Probably not, in fact.

Internally, big-bang is probably just a recursive function that simply
passes the new world as argument to its next call. No need for mutation
there.

Vincent

-- 
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.

Reply via email to