- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for mapLeft (0.12 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) -
test/typeparam/issue48716.dir/main.go
// Creates copy of set func Copy[T comparable](src MapSet[T]) (dst MapSet[T]) { dst = HashSet[T](src.Len()) Fill(src, dst) return } // Fill src from dst func Fill[T any](src, dst MapSet[T]) { src.Iterate(func(t T) bool { dst.Add(t) return true }) return } type MapSet[T any] struct { m a.Map[T, struct{}] } func HashSet[T comparable](capacity int) MapSet[T] {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 24 02:14:15 UTC 2022 - 1021 bytes - Viewed (0) -
test/nil.go
i = nil f = nil s = nil m = nil c = nil t = nil i = nil ta = make([]IN, 1) ta[0] = nil _, _, _, _, _, _, _, _ = i, f, s, m, c, t, in, ta arraytest() chantest() maptest() slicetest() } func shouldPanic(f func()) { defer func() { if recover() == nil { panic("not panicking") } }() f() } func shouldBlock(f func()) { go func() { f()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 12 18:17:49 UTC 2013 - 2.2K bytes - Viewed (0) -
test/bigalg.go
return false } if len(a) > 0 && &a[0] != &b[0] { return false } return true } var t = T{1.5, 123, "hello", 255} var mt = make(map[int]T) var ma = make(map[int][]int) func maptest() { mt[0] = t t1 := mt[0] if t1.a != t.a || t1.b != t.b || t1.c != t.c || t1.d != t.d { println("fail: map val struct", t1.a, t1.b, t1.c, t1.d) panic("bigalg") } ma[1] = a a1 := ma[1]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 12 18:17:49 UTC 2013 - 2.1K bytes - Viewed (0) -
src/internal/trace/traceviewer/static/trace_viewer_full.html
function fixVars(matchText,varA,varB){return'var('+varA+','+'var('+varB+'))';} function atApplyToCssProperties(mixinName,fallbacks){mixinName=mixinName.replace(APPLY_NAME_CLEAN,'');var vars=[];var mixinEntry=mapGet(mixinName);if(!mixinEntry){mapSet(mixinName,{});mixinEntry=mapGet(mixinName);} if(mixinEntry){var currentProto=ApplyShim.__currentElementProto;if(currentProto){mixinEntry.dependants[currentProto.is]=currentProto;}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 21 20:45:06 UTC 2023 - 2.5M bytes - Viewed (0)