Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/trunk/src/smlnj-lib/Util/queue-sig.sml
ViewVC logotype

View of /sml/trunk/src/smlnj-lib/Util/queue-sig.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 651 - (download) (annotate)
Thu Jun 1 18:34:03 2000 UTC (19 years, 4 months ago) by monnier
File size: 1012 byte(s)
bring revisions from the vendor branch to the trunk
(* queue-sig.sml
 *
 * COPYRIGHT (c) 1993 by AT&T Bell Laboratories.  See COPYRIGHT file for details.
 *
 * Imperative fifos
 *
 *)

signature QUEUE =
  sig
    type 'a queue

    exception Dequeue

    val mkQueue : unit -> 'a queue
	(* make a new queue *)
    val clear : 'a queue -> unit
	(* remove all elements *)
    val isEmpty : 'a queue -> bool
	(* test for empty queue *)
    val enqueue : 'a queue * 'a -> unit
	(* enqueue an element at the rear *)
    val dequeue : 'a queue -> 'a
	(* remove the front element (raise Dequeue if empty) *)
    val delete : ('a queue * ('a -> bool)) -> unit
	(* delete all elements satisfying the given predicate *)
    val head : 'a queue -> 'a
    val peek : 'a queue -> 'a option
    val length : 'a queue -> int
    val contents : 'a queue -> 'a list
    val app : ('a -> unit) -> 'a queue -> unit
    val map : ('a -> 'b) -> 'a queue -> 'b queue
    val foldl : ('a * 'b -> 'b) -> 'b -> 'a queue -> 'b
    val foldr : ('a * 'b -> 'b) -> 'b -> 'a queue -> 'b

  end

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0