ArrayDiscriminator

An ArrayDiscriminator discriminates arrays. It discriminates its input by discriminating against each of its parts, one at a time. Because it discriminates arrays, it extracts each element of the array in turn, and discriminates on those values. It determines which Discriminator to use on the elements based on the type of the first non-null array element it encounters.

Example

Given the input...

  • {[0], [1, 2, 3], [1, 3, 2], [1, 2, 3], [1], [0], [1, 3, 2], [0, 1]}

... an ArrayDiscriminator returns the following equivalence classes:

  • {[1]}
  • {[0, 1]}
  • {[0], [0]}
  • {[1, 2, 3], [1, 2, 3]}
  • {[1, 3, 2], [1, 3, 2]}