code: public static function find($traversable, callable $predicate)
      {
          self::invariant(
              is_array($traversable) || $traversable instanceof Traversable,
              __METHOD__ . ' expects array or Traversable'
          );
  
          foreach ($traversable as $key => $value) {
              if ($predicate($value, $key)) {
                  return $value;
              }
          }
  
          return null;
      }
docs: @param mixed|Traversable $traversable
  
  @return mixed|null