This is a really tiny utility I put together to make validation code, e.g. in constructors and functions, more readable and easy to write with less boiler-plate. The different validation statements are run individually and the result is combined.
Disclaimer: I did this as a learning exercise to learn a bit of Scala and functional programming. It's an experiment and should be treated as such. That said, I'm more than happy to accept comments on how the implementation might be improved.
In my TantrixSevenTilesPuzzleResolver I've used my implementation in the PlacedTantrixTile class.
Best Regards,
Jörgen Andersson
Twitter: @se_thinking