But actually, since Stack is immutable here, it doesn't really make sense to implement pop as an instance member, since then it's really more like peek. So you might want to implement it as a function in a companion module (or / and as a static member of Stack for compatibility with other .NET languages):