Lists are pointers to the head of list. It can be defined by a discriminated union type. Using continuation can do a tail-recursion version of appending two lists.
Posted: 6 years ago by
Immutable stack can be implemented via Discriminated Union Type with methods like Push and Pop. The following snippet is a simple version of it.
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.