package monadlib
Module TagTree.Make
Parameters
module Tag : sig ... endSignature
type tag = Tag.tinclude Monad.BaseCollectionM with type 'a m = (Tag.t, 'a LazyList.t) node
difference p xs ys removes all elements from xs which are less than or equal to some element in ys, according to the partial order p.
include Monad.BaseLazyPlus with type 'a m = (Tag.t, 'a LazyList.t) node
val zero : unit -> 'a mval null : 'a m -> boolnull x implies that x is zero. If you do not want to or cannot answer whether a given x is zero, then null x should be false.
difference p xs ys removes all elements from xs which are less than or equal to some element in ys, according to the partial order p.
unique eq xs removes duplicates according to the function cmp.
maxima p xs leaves only the maximal elements according to the partial order p.
nub p xs ys is the same as maxima, but some values might be treated as greater than others depending on their position in the collection.
For instance, with lists, we treat elements that occur earlier in the list as always greater than elements that occur later, otherwise we use p. This is really just an optimisation: in order to retrieve any value from maxima p xs, the maxima function will have had to seen every value. Not so with nub.
val count : 'a m -> intval to_list : 'a m -> 'a LazyList.tval branch : tag LazyList.t -> tag mval print : ('a -> unit) -> 'a m -> unit