いたずら

Fun and functional programming

reasonml

Type-Safety and Abstraction using Singleton Variants

Variants are sold as one of Reason's more powerful features, often demonstrated to show polymorphic pattern matching; however, they have another interesting use case by boxing datatypes as singleton variants to create something similar to a Value Class or newtype. From working with Scala