const x = { a: E.right(1), b: E.right(2), c: E.right(3) }
// works
const a = pipe(x,(y) => Record.collect(y, (_, n) => n))
// Does not work. Typescript says:
// Argument of type '{ a: E.Either<never, number>; b: E.Either<never, number>; c: E.Either<never, number>; }' is not assignable to parameter of type 'Readonly<Record<"a" | "b" | "c", never>>'.
const b = pipe(x,Record.collect((_, n) => n))
const x = { a: E.right(1), b: E.right(2), c: E.right(3) }
// works
const a = pipe(x,(y) => Record.collect(y, (_, n) => n))
// Does not work. Typescript says:
// Argument of type '{ a: E.Either<never, number>; b: E.Either<never, number>; c: E.Either<never, number>; }' is not assignable to parameter of type 'Readonly<Record<"a" | "b" | "c", never>>'.
const b = pipe(x,Record.collect((_, n) => n))