atLeast

inline fun <T> Array<T>.atLeast(n: Int, predicate: (T) -> Boolean): Boolean(source)

Returns true if at least n elements in the list match the given predicate.

Return

true if at least n elements match the predicate, false otherwise.

Parameters

n

The minimum number of elements that must match the predicate.

predicate

A function that takes an element of type T and returns a Boolean.

Throws


inline fun IntArray.atLeast(n: Int, predicate: (Int) -> Boolean): Boolean(source)

Returns true if at least n elements in the list match the given predicate.

Return

true if at least n elements match the predicate, false otherwise.

Parameters

n

The minimum number of elements that must match the predicate.

predicate

A function that takes an element of type Int and returns a Boolean.

Throws


inline fun LongArray.atLeast(n: Int, predicate: (Long) -> Boolean): Boolean(source)

Returns true if at least n elements in the list match the given predicate.

Return

true if at least n elements match the predicate, false otherwise.

Parameters

n

The minimum number of elements that must match the predicate.

predicate

A function that takes an element of type Long and returns a Boolean.

Throws


inline fun FloatArray.atLeast(n: Int, predicate: (Float) -> Boolean): Boolean(source)

Returns true if at least n elements in the list match the given predicate.

Return

true if at least n elements match the predicate, false otherwise.

Parameters

n

The minimum number of elements that must match the predicate.

predicate

A function that takes an element of type Float and returns a Boolean.

Throws


inline fun DoubleArray.atLeast(n: Int, predicate: (Double) -> Boolean): Boolean(source)

Returns true if at least n elements in the list match the given predicate.

Return

true if at least n elements match the predicate, false otherwise.

Parameters

n

The minimum number of elements that must match the predicate.

predicate

A function that takes an element of type Double and returns a Boolean.

Throws