Created
May 31, 2018 18:34
-
-
Save scalolli/ffec4c40999f963f198ea81099001aa4 to your computer and use it in GitHub Desktop.
Either traverse cats
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
import cats.implicits._ | |
def parseInt(s: String): Either[NumberFormatException, Int] = Either.catchOnly[NumberFormatException](s.toInt) | |
List("1", "2", "3").traverse(parseInt) | |
Just put -Ypartial-unification
in scalacOptions dumb ass !
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This fails with compilation errors: