;; -*-theme-*-

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

(define-body (examples sequence-list-impl)


  (import (standard-library list-utilities))

  
  (define-static-param-virtual-method sequence-ref (%element)
    (((l (:uniform-list %element)) (i <integer>))
     %element pure)
    (uniform-list-ref l i))


  (define-static-param-virtual-method sequence-length (%element)
    (((l (:uniform-list %element)))
     <integer> pure)
    (length l))


  (define-static-param-virtual-method sequence-map (%element)
    (((proc (:procedure (%element) %element pure))
      (l (:uniform-list %element)))
     (:uniform-list %element) pure)
    (map1 proc l)))
