It’s helpful to put the types in here. We have created a lambda function that takes a single integer parameter then checks to see whether it is equal to its absolute value. When we run QuickCheck, we see this fails quickly — for negative numbers! This is a problem with our property specification, not with the abs function itself.
OK — so let’s write another check. We want to say that a value is always equal to its absolute value, or (0 – its absolute value)
Great, it works! Now what else could we check? Maybe we could that the first element of a sorted list is its minimum, or that the last element is its maximum?