System.Collections.Immutable by Microsoft

<PackageReference Include="System.Collections.Immutable" Version="9.0.4" />

.NET API 251,192 bytes

 ImmutableStack

public static class ImmutableStack
Provides a set of initialization methods for instances of the ImmutableStack<T> class. NuGet package: System.Collections.Immutable (about immutable collections and how to install)
public static ImmutableStack<T> Create<T>()

Creates an empty immutable stack.

public static ImmutableStack<T> Create<T>(T item)

Creates a new immutable stack that contains the specified item.

public static ImmutableStack<T> Create<T>(T[] items)

Creates a new immutable stack that contains the specified array of items.

public static ImmutableStack<T> Create<T>(ReadOnlySpan<T> items)

Creates a new immutable stack that contains the specified array of items.

public static ImmutableStack<T> CreateRange<T>(IEnumerable<T> items)

Creates a new immutable stack that contains the specified items.

public static IImmutableStack<T> Pop<T>(this IImmutableStack<T> stack, out T value)

Removes the specified item from an immutable stack.