This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace PureIO { | |
/* | |
C# does not have proper sum types. They must be emulated. | |
This data type is one of 4 possible values: | |
- WriteOut, being a pair of a string and A | |
- WriteErr, being a pair of a string and A | |
- readLine, being a function from string to A |