Effect equivalent of an assertion with `unless` and `TaggedError`

what's the Effect equivalent of something like
const assertBlah = () => {
  if (!x.something) {
    throw new Error('')
  }
}

const other = () => {
  assertBlah({})
}

?
I presume it can be done with an unless and TaggedError in Effect.gen but I can't find the examples for when/unless
Was this page helpful?