declare const list: A[]
export const findIndex =
(self: A): O.Option<number> =>
RA.findFirstIndex(list, Equal.equals(self));
export const kills =
(b: A) =>
(a: A): Effect.Effect<never, never, boolean> =>
Effect.gen(function* (_) {
const indexA = yield* _(findIndex(a)); // <- Type 'Effect<never, NoSuchElementException, boolean>' is not assignable to type 'Effect<never, never, boolean>'
Type 'NoSuchElementException' is not assignable to type 'never'
const indexB = yield* _(findIndex(b));
return (indexB - indexA + 5) % 5 === 1;
});
declare const list: A[]
export const findIndex =
(self: A): O.Option<number> =>
RA.findFirstIndex(list, Equal.equals(self));
export const kills =
(b: A) =>
(a: A): Effect.Effect<never, never, boolean> =>
Effect.gen(function* (_) {
const indexA = yield* _(findIndex(a)); // <- Type 'Effect<never, NoSuchElementException, boolean>' is not assignable to type 'Effect<never, never, boolean>'
Type 'NoSuchElementException' is not assignable to type 'never'
const indexB = yield* _(findIndex(b));
return (indexB - indexA + 5) % 5 === 1;
});