My two solution to the 2 practice projections of matrices: I think the second one was very close to "insane difficulty" level. ;-------------------------------------------
(define (project_3->2_matrix_concat matrix) ((accumulate_lr () (lambda (x) x) append) matrix)) ;------------------------------------------- (define (project_3->2_matrix_sum matrix)
(define (list_summer listlist)
(cond ((null? (cdr listlist)) (car listlist))
(else
(list_summer (append (list (map + (car listlist) (cadr listlist))) (cddr listlist))))))
((map_parallel_lists list_summer) matrix))
|
I think the exam question is easier by Mike O'Donnell, 2002, Dec 10
Summing is not that hard by Maris Goldmanis, 2002, Dec 10
to: