module Clist:sig
..end
type 'a
clist =
| |
CList of |
(* |
The only representation for the empty
list. Try to use sparingly.
| *) |
| |
CConsL of |
(* |
Do not use this a lot because scanning
it is not tail recursive
| *) |
| |
CConsR of |
|||
| |
CSeq of |
(* |
We concatenate only two of them at this
time. Neither is the empty clist. To be
sure always use append to make these
| *) |
val toList : 'a clist -> 'a list
val fromList : 'a list -> 'a clist
val single : 'a -> 'a clist
val empty : 'a clist
val append : 'a clist -> 'a clist -> 'a clist
val checkBeforeAppend : 'a clist -> 'a clist -> bool
val length : 'a clist -> int
val map : ('a -> 'b) -> 'a clist -> 'b clist
val fold_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a clist -> 'acc
val iter : ('a -> unit) -> 'a clist -> unit
val rev : ('a -> 'a) -> 'a clist -> 'a clist
val docCList : Pretty.doc -> ('a -> Pretty.doc) -> unit -> 'a clist -> Pretty.doc
docList
)