A simple immutable stack implementation in Scala that shows the use of variance annotations of type parameters of generic classes.