- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for mapLeft (0.08 sec)
-
platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/PairTest.groovy
t.pushRight(2).right == 2 t.mapLeft { it + 1 }.left == 2 t.mapLeft { it + 1 }.right == "a" t.mapRight { it * 2 }.left == 1 t.mapRight { it * 2 }.right == "aa" t.nestLeft(2).mapLeft(unpackLeft()).left == 2 t.nestLeft(2).mapLeft(unpackRight()).left == 1 t.nestLeft(2).mapLeft(unpackLeft()).right == "a" t.nestLeft(2).mapLeft(unpackRight()).right == "a"
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 08:48:02 UTC 2023 - 1.7K bytes - Viewed (0) -
platforms/core-runtime/functional/src/main/java/org/gradle/internal/Either.java
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 08:22:02 UTC 2023 - 5.1K bytes - Viewed (0) -
platforms/core-runtime/functional/src/test/groovy/org/gradle/internal/EitherTest.groovy
right.right.get() == RIGHT } def "map() works"() { expect: left.mapLeft({ assert it == LEFT; LEFT2 }).left.get() == LEFT2 left.mapRight({ assert false }).left.get() == LEFT right.mapRight({ assert it == RIGHT; RIGHT2 }).right.get() == RIGHT2 right.mapLeft({ assert false }).right.get() == RIGHT } def "fold() subsumes flatMap()"() { expect:
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 08:22:02 UTC 2023 - 3.4K bytes - Viewed (0) -
platforms/core-runtime/base-services/src/main/java/org/gradle/internal/Pair.java
return of(of(t, left), right); } public <T> Pair<L, Pair<T, R>> nestRight(T t) { return of(left, of(t, right)); } public <T> Pair<T, R> mapLeft(Function<? super L, ? extends T> function) throws Exception { return of(function.apply(left), right); } public <T> Pair<L, T> mapRight(Function<? super R, ? extends T> function) throws Exception {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 08:48:02 UTC 2023 - 3.3K bytes - Viewed (0)