Code for the Immutable Stack Training