-
-
Save marcossevilla/aaf9f65426a146623bf0ea7a94ab1eae to your computer and use it in GitHub Desktop.
This file contains 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
Either<int, String> getPersonData(Person person) { | |
final returnName = Random().nextBool(); | |
if (returnName) { | |
return Right(person.name); | |
} else { | |
return Left(person.age); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment