| Linux premium331.web-hosting.com 4.18.0-553.80.1.lve.el8.x86_64 #1 SMP Wed Oct 22 19:29:36 UTC 2025 x86_64 Path : /home/livedhms/nodevenv/lmgt/22/lib/node_modules/effect/src/ |
| Current File : /home/livedhms/nodevenv/lmgt/22/lib/node_modules/effect/src/NonEmptyIterable.ts |
/**
* @since 2.0.0
*/
/**
* @category symbol
* @since 2.0.0
*/
export declare const nonEmpty: unique symbol
/**
* @category model
* @since 2.0.0
*/
export interface NonEmptyIterable<out A> extends Iterable<A> {
readonly [nonEmpty]: A
}
/**
* @category getters
* @since 2.0.0
*/
export const unprepend = <A>(self: NonEmptyIterable<A>): [firstElement: A, remainingElements: Iterator<A>] => {
const iterator = self[Symbol.iterator]()
const next = iterator.next()
if (next.done) {
throw new Error(
"BUG: NonEmptyIterator should not be empty - please report an issue at https://github.com/Effect-TS/effect/issues"
)
}
return [next.value, iterator]
}