import * as tracing_1 from "../../../../Tracing"
const fileName_1 = "(@effect-ts/system): _src/Collections/Immutable/Chunk/api/every.ts"
import { concreteId } from "../definition"
/**
 * Determines whether a predicate is satisfied for all elements of this chunk.
 */

export function every_(self, f) {
  const iterator = self.arrayLikeIterator()
  let next

  while ((next = iterator.next()) && !next.done) {
    const array = next.value
    const len = array.length
    let i = 0

    while (i < len) {
      const a = array[i]

      if (!f(a)) {
        return false
      }

      i++
    }
  }

  return true
}
/**
 * Determines whether a predicate is satisfied for all elements of this chunk.
 *
 * @dataFirst every_
 */

export function every(f) {
  return (self) => every_(self, f)
}
//# sourceMappingURL=every.js.map
