getkyo / kyo

Toolkit for Scala Development
https://getkyo.io
Apache License 2.0
481 stars 38 forks source link

prelude: Maybe and Result improvements #509

Closed fwbrasil closed 3 days ago

fwbrasil commented 4 days ago

This PR introduces a few improvements. The main one is allocation-free pattern matching for both Maybe and Result. The new implicit class Maybe.Ops wraps a Maybe into an AnyVal, which satisfies the compiler to consider the method an extractor.