projects
/
tatoo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change the interface of node_list (fully imperative now)
[tatoo.git]
/
src
/
node_list.ml
diff --git
a/src/node_list.ml
b/src/node_list.ml
index
2219d5b
..
e9bb58a
100644
(file)
--- a/
src/node_list.ml
+++ b/
src/node_list.ml
@@
-17,9
+17,19
@@
module type S =
sig
type node
type t
sig
type node
type t
+ type iterator
val create : unit -> t
val create : unit -> t
- val add : node -> t -> t
+ val add : node -> t -> unit
+ val push_front : node -> t -> unit
+ val push_back : node -> t -> unit
val iter : (node -> unit) -> t -> unit
val length : t -> int
val iter : (node -> unit) -> t -> unit
val length : t -> int
+ val is_empty : t -> bool
+ val head : t -> iterator
+ val last : t -> iterator
+ val next : iterator -> iterator
+ val value : iterator -> node
+ val finished : iterator -> bool
+ val copy : t -> t
end
end