input: 
  def filter_array(array, criteria):
      """
      Filter an array by a given criteria.
      
      Example:
      >>> criteria = lambda x: x % 5 == 0
      >>> filter_array([1, 2, 5, 10, 15, 20, 25, 30], criteria)
      [5, 10, 15, 20, 25, 30]
      """
      
      filtered_array = []
      for value in array:
          if criteria(value):
              filtered_array.append(value)
      
      return filtered_array
  
output:     filtered_array = []
      for value in array:
          if criteria(value):
              filtered_array.append(value)
      
      return filtered_array