Compares two list and returns how they have changed. Each function internally uses Wu's O(NP) algorithm.
This describes how each line has changed and also contains its value.
diff : List a -> List a -> List (Change a)
Compares general lists.
diff [1, 3] [2, 3] == [Removed 1, Added 2, NoChange 3] -- True
diffLines : String -> String -> List (Change String)
Compares two text.
Giving the following text
a =
"""aaa
bbb
ddd"""
b =
"""zzz
aaa
ccc
ddd"""
results in
[ Added "zzz"
, NoChange "aaa"
, Removed "bbb"
, Added "ccc"
, NoChange "ddd"
]
.