(index ("make-diff" 0) ("make-hunks" 960))
(def (sig (procedure "make-diff:: EQUAL? SEQ-REF SEQ-LENGTH HUNKS-PROC -> DIFF-PROC" (id make-diff))) (p "Creates a diff procedure, where") (ul (li (tt "EQUAL?") " is an equality predicate for elements of the type being compared; ") (li (tt "SEQ-REF") " is a procedure of the form " (tt "LAMBDA SEQ INDEX -> ELEMENT") " which returns element " (tt "INDEX") " from sequence " (tt "SEQ") "; ") (li (tt "SEQ-LENGTH") " is a procedure of the form " (tt "LAMBDA SEQ -> LEN") " which returns the length  of sequence " (tt "SEQ") "; ") (li (tt "HUNKS") " is a procedure of the type created by " (tt "make-hunks") ", which is described below.")) (p "The returned procedure is of the form " (tt "LAMBDA A B [CONTEXT-LEN] -> (HUNK ... )") " where " (tt "A") " and " (tt "B") " are two sequences to be compared, and " (tt "CONTEXT-LEN") " is an optional context length, which is used by the " (tt "HUNKS") " procedure to create context in the hunks of the edit script"))
(def (sig (procedure "make-hunks:: SEQ-REF SEQ-LENGTH SEQ-SLICE -> HUNKS-PROC" (id make-hunks))) (p "creates a procedure that creates insert/remove/change hunks given a stack of matching index ranges that is produced by the " (tt "diff") " procedure above.") (ul (li (tt "SEQ-REF") " is a procedure of the form " (tt "LAMBDA SEQ INDEX -> ELEMENT") " which returns element " (tt "INDEX") " from sequence " (tt "SEQ") "; ") (li (tt "SEQ-LENGTH") " is a procedure of the form " (tt "LAMBDA SEQ -> LEN") " which returns the length  of sequence " (tt "SEQ") "; ") (li (tt "SEQ-SLICE") " is a procedure of the form " (tt "LAMBDA SEQ START END -> SEQ") " which returns a list  with the elements contained within the specified range in the input sequence " (tt "SEQ") "; ")) (p "The returned procedure is of the form " (tt "LAMBDA A B CSS [CONTEXT] -> (HUNK ... )") " where " (tt "A") " and " (tt "B") " are the two sequences compared, " (tt "CSS") " is the stack of matching ranges returned by " (tt "diff") ", and " (tt "CONTEXT") " is an optional argument that is used to add context to the generated hunks, if specified."))
