|
question1.scm
(define threedmatrix '( ((1 2 3) (4 5 6) (7 8 9)) ((10 11 12) (13 14 15) (16 17 18)) ((19 20 21) (22 23 24) (25 26 27)))) (define (project_2->1_matrix twomatrix) ((accumulate_lr '() (lambda (x) x) append) twomatrix)) (define (project_3->2_matrix threematrix) ((map_parallel_lists project_2->1_matrix) threematrix)) (project_3->2_matrix threedmatrix) (define (sum_3->2_matrix threematrix) ((map_parallel_lists sums) threematrix)) |
to: