;; -*-theme-d-*-

;; Copyright (C) 2014  Tommi Höynälänmaa
;; Distributed under GNU General Public License version 3,
;; see file doc/GPL-3.

;; Expected results: translation and running OK


(define-proper-program (tests test254)


  (import (standard-library core)
	  (standard-library console-io))


  (define-param-proc display-list-matrix (%number)
		     (((mx (:uniform-list (:uniform-list %number))))
		       <none>
		      (nonpure))
    (do ((rows (:uniform-list (:uniform-list %number)) mx (gen-cdr rows)))
	((null? rows))
      (begin
	(do ((columns (:uniform-list %number) (gen-car rows) (gen-cdr columns)))
	    ((null? columns))
	    (begin
	      (console-display (gen-car columns))
	      (console-display-string " ")))
	(console-newline))))


  (define main
    (lambda (() <none> nonpure)
      (let ((mx1 (list
		  (list 1.0 0.0 2.0)
		  (list -1.5 2.5 0.0)
		  (list -3.0 -2.0 1.0)))
	    (mx2 (list
		  (list 0.0 0.0 -2.0)
		  (list 5.5 2.0 1.0)
		  (list 0.0 2.0 -1.0))))
	  (display-list-matrix mx1)
	  (console-newline)
	  (display-list-matrix mx2)
	  (console-newline)))))
