Import Upstream version 20180207
[hcoop/debian/mlton.git] / lib / mlton / basic / queue.sig
1 (* Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh
2 * Jagannathan, and Stephen Weeks.
3 *
4 * MLton is released under a BSD-style license.
5 * See the file MLton-LICENSE for details.
6 *)
7
8 signature QUEUE =
9 sig
10 type 'a t
11
12 val deque: 'a t -> ('a t * 'a) option
13 val empty: unit -> 'a t
14 val enque: 'a t * 'a -> 'a t
15 val foldAnyOrder: 'a t * 'b * ('a * 'b -> 'b) -> 'b
16 val foldr: 'a t * 'b * ('a * 'b -> 'b) -> 'b
17 val isEmpty: 'a t -> bool
18 val toList: 'a t -> 'a list
19 end