diff --git a/README.md b/README.md index 901523f..37f9ec3 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ While `Either` is right–biased, it is possible to operate on the left values b The latest release is available on [Maven Central](https://search.maven.org/artifact/io.github.2bllw8/either/2.0.0/jar). ```groovy -implementation 'io.github.2bllw8:either:2.0.0' +implementation 'io.github.2bllw8:either:2.1.0' ``` ## Usage @@ -49,13 +49,10 @@ public class Main { for (int i = 0; i < results.size(); i++) { final String arg = args[i]; - final Either either = results.get(i); - if (either.isRight()) { - either.forEach(x -> System.out.println(arg + " -> " + x)); - } else { - either.left().forEach(x -> System.err.println("Error occurred for '" - + arg + "': " + x)); - } + results.get(i).forEach( + left -> System.err.println( + "Error occurred for '" + arg + "': " + left), + right -> System.out.println(arg + " -> " + right)); } } } diff --git a/lib/build.gradle b/lib/build.gradle index 522e3e1..638f569 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -28,7 +28,7 @@ pmd { archivesBaseName = rootProject.name group = 'exe.bbllw8' -version = '2.0.0' +version = '2.1.0' javadoc { options.memberLevel = JavadocMemberLevel.PUBLIC