limit method
Returns the first limit
instances of the collection.
Returns the entire collection as an ordered list if limit
is null.
Implementation
List<TermSimilarity> limit([int? limit = 10]) {
final list = List<TermSimilarity>.from(this);
return (limit != null && list.length > limit)
? list.sublist(0, limit)
: list;
}