Understanding Lambda Expressions

This question is about one of the exercises. What is the point of having this

static bool HitGround(string s)
  {
      return s == "meteorite";
    }

in the Array.Exists() method? What does it do?

using System;

namespace AlternateExpressions

{

  class Program

  {

    static void Main(string[] args)

    {

      string[] spaceRocks = {"meteoroid", "meteor", "meteorite"};

      

      bool makesContact = Array.Exists(spaceRocks, HitGround);

      

      if (makesContact)

      {

        Console.WriteLine("At least one space rock has reached the Earth's surface!");

      } 

    } 
    static bool HitGround(string s)
    {
      return s == "meteorite";
    }
  }
}

In the context of the exercise, the function is not in the method but rather a parameter for it. In simpler English, you are running the method Array.Exists() and checking whether HitGround exists in the array spaceRocks. (to check if it has hit or not).

As always, whenever there’s confusion over a method, documentation is a solid place for a first look-up, so this may help contextualize what you’re doing: Array.Exists<T>(T[], Predicate<T>) Method (System) | Microsoft Docs