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