type'a common = [
`Common of int * int * 'a
] (** an element of lcs of seq1 and seq2 *)
type'a edit =
[ `Removed of int * 'a
| `Added of int * 'a
| 'a common
] (** an element of diff of seq1 and seq2. *)
module type SeqType = sig type t (** The type of the sequence. *)
type elem (** The type of the elements of the sequence. *)
val get : t -> int -> elem (** [get t n] returns [n]-th element of the sequence [t]. *)
val length : t -> int (** [length t] returns the length of the sequence [t]. *) end (** Input signature of {!Diff.Make}. *)
module type S = sig type t (** The type of input sequence. *)
type elem (** The type of the elements of result / input sequence. *)
val lcs :
?equal:(elem -> elem -> bool) ->
t -> t -> elem common list (** [lcs~equalseq1seq2]computestheLCS(longestcommonsequence)of [seq1]and[seq2]. Elementsof[seq1]and[seq2]arecomparedwith[equal]. [equal]defaultsto[Pervasives.(=)].
val diff :
?equal:(elem -> elem -> bool) ->
t -> t -> elem edit list (** [diff~equalseq1seq2]computesthediffof[seq1]and[seq2]. Elementsof[seq1]and[seq2]arecomparedwith[equal].
val fold_left :
?equal:(elem -> elem -> bool) ->
f:('a -> elem edit -> 'a) ->
init:'a ->
t -> t -> 'a (** [fold_left~equal~f~initseq1seq2]issameas [diff~equalseq1seq2|>ListLabels.fold_left~f~init], butdoesnotcreateanintermediatelist.
*)
val iter :
?equal:(elem -> elem -> bool) ->
f:(elem edit -> unit) ->
t -> t -> unit (** [iter~equal~fseq1seq2]issameas [diff~equalseq1seq2|>ListLabels.iter~f], butdoesnotcreateanintermediatelist.
*) end (** Output signature of {!Diff.Make}. *)
module Make :
functor (M : SeqType) -> (S withtype t = M.t andtype elem = M.elem) (** Functor building an implementation of the diff structure
given a sequence type. *)
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.20 Sekunden
(vorverarbeitet am 2026-09-27)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.