Hi Travis Glad you found it instructive.
In mathematical terms these kinds of systems map from the current state at t=n to the next time-step at t=n+1. Given a transition function I tend to just use for/list (or for/vector) to build up a history. E.g. #lang racket (require math/matrix) (define A (matrix [[0 0 5.905] [0.368 0.639 0.025] [0.001 0.152 0.051]])) (define n (col-matrix [5 5 5])) (define (iterate A n iter) (for/list ([i iter]) (define temp n) (set! n (matrix* A n)) (list i temp))) (iterate A n 25) You could use for/fold, which avoids the use of set!, but the syntax is a little heavier. Dan -- 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.