Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for mapRight (0.12 sec)

  1. platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/PairTest.groovy

        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"
        t.nestRight(2).mapRight(unpackLeft()).right == 2
        t.nestRight(2).mapRight(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)
  2. platforms/core-runtime/functional/src/main/java/org/gradle/internal/Either.java

        /**
         * Map the left side.
         *
         * @see #mapRight
         * @see #fold
         */
        public abstract <U, V> Either<U, V> mapLeft(Function<? super L, ? extends U> f);
    
        /**
         * Map the right side.
         *
         * @see #mapLeft
         * @see #fold
         */
        public abstract <U, V> Either<U, V> mapRight(Function<? super R, ? extends V> f);
    
        /**
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:22:02 UTC 2023
    - 5.1K bytes
    - Viewed (0)
  3. 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)
  4. platforms/core-runtime/base-services/src/main/java/org/gradle/internal/Pair.java

        }
    
        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 {
            return of(left, function.apply(right));
        }
    
        @Nullable
        public <T> T map(Function<? super Pair<L, 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)
  5. src/cmd/vendor/golang.org/x/sys/unix/cap_freebsd.go

    	}
    
    	return true, nil
    }
    
    func capright(idx uint64, bit uint64) uint64 {
    	return ((1 << (57 + idx)) | bit)
    }
    
    // CapRightsInit returns a pointer to an initialised CapRights structure filled with rights.
    // See man cap_rights_init(3) and rights(4).
    func CapRightsInit(rights []uint64) (*CapRights, error) {
    	var r CapRights
    	r.Rights[0] = (capRightsGoVersion << 62) | capright(0, 0)
    	r.Rights[1] = capright(1, 0)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 5K bytes
    - Viewed (0)
Back to top