(discrepancy list1 list2)

Returns a measure of the discrepancy between list1 and list2. This will be zero if list1 and list2 are equal, and will be higher the ‘more different’ list1 is from list2. The calculation is equivalent to the following: 1. Construct a list of all of the unique items in both of the lists. Sublists and atoms all count as items.
2. Initialize the result to zero. 3. For each unique item increment the result by the difference between the number of occurrences of the item in list1 and the number of occurrences of the item in list2. 4. Return the result.


(overlap thing1 thing2)



Prints some demo output to demonstrate the behavior of the overlap function.
The overlap function returns ratios, but these are printed as floating point
numbers in the demo output.