import { isIterable } from "@thi.ng/checks/is-iterable";
import { comp } from "./comp.js";
import { filter } from "./filter.js";
import { iterator1 } from "./iterator.js";
import { take } from "./take.js";
function matchFirst(pred, src) {
  return isIterable(src) ? [...iterator1(matchFirst(pred), src)][0] : comp(filter(pred), take(1));
}
export {
  matchFirst
};
