[racket-users] stopping the big-bang

2017-12-18 Thread A Mauer-Oats
I recently came across the following behavior in big-bang that was new to me. I am writing in case I have misunderstood something. 1. (stop-with model) does not run the draw handler one last time (this is documented but I'm not sure why this choice was made) This means that a conditional in the

[racket-users] Contracts for Recursive Functions

2018-03-02 Thread A Mauer-Oats
The Racket Guide (7.2.2 Using define/contract and ->) says, "contract will always be checked on calls to deposit." It appears that recursive function calls are not included in that statement? I wish they were, for teaching beginners. Let me know if there is any (simple) way to do this. (requ

[racket-users] Question: 2D data (Arrays?) in Universe Teachpack

2017-05-27 Thread A Mauer-Oats
Does anyone use array data with the Universe teachpack? I thought it would be interesting to work with 2D data in an "advanced introductory" class. At least to the extent of being able to model classic board games like Battleship and Checkers. This time we used math/array, but arrays are basica

[racket-users] Re: stuck on a type problem

2020-07-25 Thread A Mauer-Oats
Problem 1: > But note i can't just type (λ (rng) (apply make-character rng)) into the REPL, If you're using Typed Racket, you probably want type signatures in your lambdas as well. In this case, you need to specify the type of `rng` (at least): ``` (λ ([rng : (List Integer Integer)]) (apply ma