Last active
March 31, 2022 14:20
-
-
Save adamw/9b17d25520f33be8278152332bfad39f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
opaque type NonEmptyString = String | |
object NonEmptyString: | |
def apply(s: String): Option[NonEmptyString] = | |
if s.isEmpty then None else Some(s) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment