Import Upstream version 20180207
[hcoop/debian/mlton.git] / lib / mlton / basic / circular-list.sig
1 (* Copyright (C) 1999-2006 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 CIRCULAR_LIST_STRUCTS =
9 sig
10 structure Elt: DOUBLY_LINKED
11 end
12
13 signature CIRCULAR_LIST =
14 sig
15 include CIRCULAR_LIST_STRUCTS
16
17 type 'a t = 'a Elt.t Pointer.t
18
19 val delete: 'a t * 'a Elt.t -> unit
20 val deleteEach: 'a t * ('a Elt.t -> unit) -> unit
21 val empty: unit -> 'a t
22 val first: 'a t -> 'a Elt.t
23 val foreach: 'a t * ('a Elt.t -> unit) -> unit
24 val insert: 'a t * 'a Elt.t -> unit
25 val rotate: 'a t -> unit
26 val splice: 'a t * 'a t -> unit
27 end