find_gt<E> function
Find leftmost value greater than x
Implementation
E find_gt<E>(List<E> a, E x, {Comparator<E>? compare, ToKey<E, Object>? key}) {
// todo unit-test custom compare and key
int i = bisect_right(a, x, compare: compare, key: key);
if (i != a.length) {
return a[i];
}
throw ArgumentError('Value not found');
}