;; -*-theme-*-

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

(define-interface (examples sequence)

  (import (standard-library core))

  (define-param-class :sequence
    (parameters %element))
  
  (declare-virtual-method sequence-ref
			  (:param-proc (%element)
				       ((:sequence %element) <integer>)
				       %element
				       pure))

  (declare-virtual-method sequence-length
			  (:param-proc (%element)
				       ((:sequence %element))
				       <integer>
				       pure))

  (declare-virtual-method sequence-map
			  (:param-proc (%source %target)
				       ((:procedure (%source) %target pure)
					(:sequence %source))
				       (:sequence %target)
				       pure)))

