import * as tsplus_module_1 from "@tsplus/stdlib/data/Maybe/definition";
import * as tsplus_module_2 from "@effect/core/stream/Sink/operations/fold";
/**
 * Creates a sink containing the first value.
 *
 * @tsplus static ets/Sink/Ops head
 */

export function head(__tsplusTrace) {
  return tsplus_module_2.fold(() => tsplus_module_1.emptyOf(), option => tsplus_module_1.isNone(option), (option, input) => tsplus_module_1.isSome(option) ? option : tsplus_module_1.some(input), __tsplusTrace);
}
//# sourceMappingURL=head.mjs.map