Added generic function compute-discriminating-function.