Re: [racket-users] a matrix question

2018-03-26 Thread Tim Hanson
Many thanks, Jens Axel! That looks very good and includes several techniques that will help and inspire me, in particular for*/matrix, which I hadn't used yet. I'll try it out the next chance I get. -- You received this message because you are subscribed to the Google Groups "Racket Users" gr

Re: [racket-users] a matrix question

2018-03-25 Thread Jens Axel Søgaard
Hi Tim, Here is one way to do it: #lang typed/racket (require math/matrix math/array) (: columns->matrix (All (A) ((Listof (Matrix A)) -> (Matrix A (define (columns->matrix cs) (define m (matrix-num-rows (first cs))) (define n (length cs)) (: has-m-rows? : ((Matrix A) -> Boolean)) (d