More Solutions to 2 practice projections of matrices 

Forum: Com Sci 12500, U Chicago, Autumn 2002, Discuss Classwork
Re: News I posted a study guide for the final (Mike O'Donnell)
Re: News Study questions for problem 1 (Mike O'Donnell)
Re: Question matrices ...??? (Ivan Beschastnikh)
Re: Feedback Each dimension of a matrix is a level of list nesting (Mike O'Donnell)
Date: 2002, Dec 10
From: Ivan Beschastnikh <ivan@uchicago.edu>

	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))


Messages

1. Feedback I think the exam question is easier by Mike O'Donnell, 2002, Dec 10
2. More Summing is not that hard by Maris Goldmanis, 2002, Dec 10

to: "Solutions to 2 practice projections of matrices"