similar<T> function

double Function(ImmutableList<T>) Function(ImmutableList<T>) similar<T>(
  1. Eq<T> eq
)

Determines how similar two lists are based on the Jaccard Index.

The function returns a value between 0 and 1, where 1 means the lists are identical, and 0 means they have no elements in common.

Implementation

double Function(ImmutableList<T>) Function(ImmutableList<T>) similar<T>(
    Eq<T> eq) {
  return (ImmutableList<T> list1) {
    return (ImmutableList<T> list2) {
      return _jaccardIndex(list1, list2, eq);
    };
  };
}