07 Scope and Opening

Let's import our ListStack module from before.

Now, let's create a ListStack.

That's quite verbose. There should be a way to simplify that.

Inside these parentheses, ListStack will remain in scope.

The pipeline operator makes things prettier 😊

We can also use a local open

This puts ListStack in scope for the entire let statement

A global open is another option; however, it's discouraged.

It's best to be very sparing in your use of global opens. One of the few time we do this is opening OUnit, but sometimes you might make one that we know is safe to open, and that's okay too, but generally, opening data structures is bad.