;; -*-theme-*-

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

(define-proper-program (examples sequence-sgn-test)


  (import (standard-library core)
	  (standard-library console-io)
	  (examples sequence-sgn)
	  (examples sequence-list-impl))


  (define-param-proc display-sequence (%element)
		     (((seq (:sequence %element))) <none> nonpure)
    (let ((i-len <integer> (sequence-length seq)))
      (do ((i <integer> 0 (+ i 1))) ((>= i i-len))
        (console-display (sequence-ref seq i))
        (console-newline))))


  (define-simple-proc my-proc (((i <integer>)) <integer> pure)
    (+ i 1))


  (define-simple-proc main (() <none> nonpure)
    (let* ((seq (list 1 2 3 4 5))
	   (seq2 (sequence-map my-proc seq)))
      (display-sequence seq2)))
  
  )
