;; -*-theme-*-

;; Copyright (C) 2015, 2021, 2024  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-test2)
  
  
  (import (standard-library core)
          (standard-library console-io)
          (examples sequence-sgn-simple)
          (examples sequence-list-impl))
  
  
  (define-param-method 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-method my-proc (((i <integer>)) <integer> pure)
    (+ i 1))
  
  
  (define-main-proc (() <none> nonpure)
    (console-display-line "*1*")
    (let ((seq (static-cast (:uniform-list <integer>) (list 1 2 3 4 5))))
      (console-display-line "*2*")
      (display-sequence seq)
      (console-display-line "*3*")
      (console-newline))))
