import {
  altAll
} from "./chunk-E4K6EEJW.mjs";
import {
  getApplySemigroup
} from "./chunk-ZMCLCMOU.mjs";
import {
  __export
} from "./chunk-QK4PKNB3.mjs";

// src/Alternative.ts
var Alternative_exports = {};
__export(Alternative_exports, {
  altAll: () => altAll2,
  getAlternativeMonoid: () => getAlternativeMonoid
});
function altAll2(F) {
  return altAll(F)(F.zero());
}
function getAlternativeMonoid(F) {
  const f = getApplySemigroup(F);
  return (S) => {
    const SF = f(S);
    return {
      concat: (first, second) => F.alt(SF.concat(first, second), () => F.alt(first, () => second)),
      empty: F.zero()
    };
  };
}

export {
  altAll2 as altAll,
  getAlternativeMonoid,
  Alternative_exports
};
