input: from typing import List
  
  def filter_array(array: List[int], criteria) -> List[int]:
      """ Filters an array by a given criteria function.
      >>> filter_array([1, 2, 5, 10, 15, 20, 25, 30], lambda x: x % 5 == 0)
      [5, 10, 15, 20, 25, 30]
      """
output:     return [x for x in array if criteria(x)]