/** * Runs `onTrue` if the result of `self` is `true` and `onFalse` otherwise. * * @tsplus static effect/core/io/Effect.Ops ifEffect */ export function ifEffect( b: Effect, onTrue: Effect, onFalse: Effect ): Effect { return b.flatMap((b): Effect => (b ? onTrue : onFalse)) }