Finding the first element satisfying a boolean predicate in a list

Define a function that takes as arguments a type A, a function of type A->bool, and a list and returns the first element in the list, for which the function is true (use the option type).

Solution

Look at this file