Immutable stack can be implemented via Discriminated Union Type with methods like Push and Pop. The following snippet is a simple version of it.
Posted: 5 years ago by
This web site is created using F# and Suave web server. It is hosted on
Azure and the source code is on GitHub. Contributions
The first version of fssnip.net has been created by
@tomaspetricek back in 2010.
This web site is a new, open-source and contribution-friendly version.