;; The first three lines of this file were inserted by DrScheme. They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-advanced-reader.ss" "lang")((modname |29.3|) (read-case-sensitive #t) (teachpacks ((lib "draw.ss" "teachpack" "htdp") (lib "arrow.ss" "teachpack" "htdp") (lib "gui.ss" "teachpack" "htdp"))) (htdp-settings #(#t constructor repeating-decimal #t #t none #f ((lib "draw.ss" "teachpack" "htdp") (lib "arrow.ss" "teachpack" "htdp") (lib "gui.ss" "teachpack" "htdp"))))) A matrix is a (vectorof (vectorof numbers)). Specifically, an rxc matrix has a vector-length of r, and each element has a vector-length of c. (define (build-matrix rows cols f) (build-vector rows (lambda (r) (build-vector cols (lambda (c) (f (+ r 1) (+ c 1))))))) (define (transpose a-matrix)