Enumerating Stacks

Saturday, December 03 2016 immutable-types csharp

The immutable stack implementation we wrote in Immutable Stacks doesn’t provide consumers with an easy way to iterate through everything on the stack. We can (and should) remedy this by implementing IEnumerable<T>.

Read more »

Stack Equality

Friday, December 09 2016 immutable-types csharp

As previously discussed, it is important to implement an appropriate definition of Equality for most .NET classes. Let’s extend our immutable stack implementation appropriately.

Read more »

Stacks Miscellany

Thursday, December 22 2016 immutable-types csharp

Before we move on to other kinds of immutable data structures, some miscellany about how we might improve on the ImmutableStack<T> we already have - or perhaps just do things differently. All of these observations were submitted by blog readers - thanks everyone for the feedback.

Read more »


Friday, December 30 2016 immutable-types csharp

Moving on from our discussion of immutable stacks, let us look at how to effectively implement an ImmutableQueue<T>. What can the exercise teach us?

Read more »