ConsListnumbers = ConsList.Of(1, 2, 3, 4, 5); bool hasOddNumber = numbers.Any(n => n % 2 == 1); // This returns true because there is at least one odd number in the list
ConsListThe ConsList and Any are part of the System.Collections.Immutable package library.names = ConsList.Of("Alice", "Bob", "Charlie"); bool hasNameStartingWithB = names.Any(n => n.StartsWith("B")); // This returns true because "Bob" starts with "B"