MCPcopy Index your code
hub / github.com/Effect-TS/effect / noneIn

Function noneIn

packages/effect/src/List.ts:500–516  ·  view source on GitHub ↗
(
  self: List<A>,
  predicate: Predicate<A>,
  isFlipped: boolean
)

Source from the content-addressed store, hash-verified

498
499// everything seen so far is not included
500const noneIn = <A>(
501 self: List<A>,
502 predicate: Predicate<A>,
503 isFlipped: boolean
504): List<A> => {
505 while (true) {
506 if (isNil(self)) {
507 return _Nil
508 } else {
509 if (predicate(self.head) !== isFlipped) {
510 return allIn(self, self.tail, predicate, isFlipped)
511 } else {
512 self = self.tail
513 }
514 }
515 }
516}
517
518// everything from 'start' is included, if everything from this point is in we can return the origin
519// start otherwise if we discover an element that is out we must create a new partial list.

Callers 1

List.tsFile · 0.85

Calls 3

isNilFunction · 0.85
allInFunction · 0.85
predicateFunction · 0.50

Tested by

no test coverage detected