;; -*-theme-d-*-

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

(define-interface (standard-library dynamic-list)

  (import (standard-library core))

  (declare d-car (:procedure (<object>) <object> pure))

  (declare d-cdr (:procedure (<object>) <object> pure))

  (declare d-list (:procedure ((rest <object>)) <object> pure))

  (declare d-list-ref (:procedure (<object> <integer>) <object> pure))

  (declare d-map1 (:procedure ((:procedure (<object>) <object> pure)
			       <object>)
			      <object>
			      pure))

  (declare d-map-nonpure1 (:procedure ((:procedure (<object>) <object> nonpure)
				       <object>)
				      <object>
				      nonpure))

  (declare d-for-each1 (:procedure ((:procedure (<object>) <none> nonpure)
				    <object>)
				   <none>
				   nonpure))

  (declare d-map (:procedure ((:procedure ((rest <object>)) <object> pure)
			      (rest <object>))
			     <object>
			     pure))

  (declare d-map-nonpure (:procedure ((:procedure ((rest <object>)) <object>
						  nonpure)
				      (rest <object>))
			     <object>
			     nonpure))

  (declare d-for-each (:procedure ((:procedure ((rest <object>)) <none>
					       nonpure)
				   (rest <object>))
				  <none>
				  nonpure))


  (declare d-append (:procedure ((rest <object>)) <object> pure)))
