import * as tracing_1 from "../../../../Tracing";
const fileName_1 = "(@effect-ts/system): _src/Collections/Immutable/Chunk/api/find.ts";
import * as O from "../../../../Option";
import { concreteId } from "../definition";
export function find_(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 O.some(a);
      }

      i++;
    }

    next = iterator.next();
  }

  return O.none;
}
export function find(f) {
  return self => find_(self, f);
}
//# sourceMappingURL=find.js.map