;; -*-theme-d-*-

;; Copyright (C) 2016 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 test389)

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

  (define-simple-proc main (() <none> nonpure)
    (let ((lst '(1 2 3 4 5 6 7 8 9 10)))
      (console-display-line (take lst 3))
      (console-display-line (drop lst 3))
      (console-display-line (take-right lst 3))
      (console-display-line (drop-right lst 3))
      (console-display-line (last lst))
      (guard-without-result (exc (else (console-display-line exc)))
			    (console-display-line (take lst 11)))
      (guard-without-result (exc (else (console-display-line exc)))
			    (console-display-line (drop lst 11)))
      (guard-without-result (exc (else (console-display-line exc)))
			    (console-display-line (take-right lst 11)))
      (guard-without-result (exc (else (console-display-line exc)))
			    (console-display-line (drop-right lst 11))))))

 
