firstOrNull

fun ComplexFloatArray.firstOrNull(): ComplexFloat?
fun ComplexDoubleArray.firstOrNull(): ComplexDouble?

Returns the first element, or null if the array is empty.


inline fun ComplexFloatArray.firstOrNull(predicate: (ComplexFloat) -> Boolean): ComplexFloat?
inline fun ComplexDoubleArray.firstOrNull(predicate: (ComplexDouble) -> Boolean): ComplexDouble?

Returns the first element matching the given predicate, or null if element was not found.