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 listval fromList : 'a list -> 'a clistval single : 'a -> 'a clistval empty : 'a clistval append : 'a clist -> 'a clist -> 'a clistval checkBeforeAppend : 'a clist -> 'a clist -> boolval length : 'a clist -> intval map : ('a -> 'b) -> 'a clist -> 'b clistval fold_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a clist -> 'accval iter : ('a -> unit) -> 'a clist -> unitval rev : ('a -> 'a) -> 'a clist -> 'a clistval docCList : Pretty.doc -> ('a -> Pretty.doc) -> unit -> 'a clist -> Pretty.docdocList)