Commit | Line | Data |
---|---|---|
7f918cf1 CE |
1 | (* fun-prio-queue.sig\r |
2 | * 2004 Matthew Fluet (mfluet@acm.org)\r | |
3 | * Ported to MLton threads.\r | |
4 | *)\r | |
5 | \r | |
6 | signature FUN_PRIORITY_QUEUE_ARG =\r | |
7 | sig\r | |
8 | structure Key :\r | |
9 | sig\r | |
10 | type t\r | |
11 | val compare : t * t -> order\r | |
12 | end\r | |
13 | end\r | |
14 | \r | |
15 | signature FUN_PRIORITY_QUEUE =\r | |
16 | sig\r | |
17 | include FUN_PRIORITY_QUEUE_ARG\r | |
18 | \r | |
19 | structure Elt:\r | |
20 | sig\r | |
21 | type 'a t\r | |
22 | val key: 'a t -> Key.t\r | |
23 | val value: 'a t -> 'a\r | |
24 | end\r | |
25 | \r | |
26 | type 'a t\r | |
27 | \r | |
28 | val clean: 'a t * ('a Elt.t -> bool) -> 'a t\r | |
29 | val cleanAndDeque: 'a t * ('a Elt.t -> bool) -> 'a Elt.t option * 'a t\r | |
30 | val cleanPrefix: 'a t * ('a Elt.t -> bool) -> 'a t\r | |
31 | val deque: 'a t -> ('a Elt.t * 'a t) option\r | |
32 | val empty: 'a t -> bool\r | |
33 | val enque: 'a t * Key.t * 'a -> 'a t\r | |
34 | val enqueAndClean: 'a t * Key.t * 'a * ('a Elt.t -> bool) -> 'a t\r | |
35 | val new: unit -> 'a t\r | |
36 | val peek: 'a t -> 'a Elt.t option\r | |
37 | end\r |