Skip to content

This Tennis-Kata is a C# rewrite of the solution by Mark Seeman. This is an example of how to make illegal states unrepresentable with discriminated unions in C# via Funcky.DiscriminatedUnion.

License

Notifications You must be signed in to change notification settings

polyadic/tennis-kata

Repository files navigation

Tennis Kata

This solution is based on Mark Seemans solution to the Tennis Kata

https://blog.ploeh.dk/2016/02/10/types-properties-software/

It has been chosen as an example on how to work with Funcky.DiscriminatedUnion.

It is a direct translation of the F# solution to C# but not with the Isomorphic Visitor-Pattern. instead we use Funcky.DiscriminatedUnion to create automatically exhaustive Match (and Switch) functions via the C# generator.

This reduces the boiler-plate code to an absolut minimum, and it is viable solution to using DiscriminatedUnions more often in C#.

About

This Tennis-Kata is a C# rewrite of the solution by Mark Seeman. This is an example of how to make illegal states unrepresentable with discriminated unions in C# via Funcky.DiscriminatedUnion.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages