Option Type
The Option<T> type represents a value that may or may not exist. It has two constructors: Some(value) indicates a value exists, and None indicates no value. This is safer than using special values (like -1 or empty string) to represent missing values.
Option<T> can be abbreviated as ?T. For example, Option<Int64> and ?Int64 are equivalent.
When a function may not be able to return a valid result, it should return an Option type. For example, a find function returns None when the target is not found, and a division function returns None when the divisor is zero.
The findIndex function on the right searches for a target value in an array, returning Some(index) if found, otherwise None. The divide function returns Some(result) when the divisor is non-zero, otherwise None.
Try adding a parameter to findIndex to start searching from a specified position.