| 477 | } |
| 478 | const resolution = result.success |
| 479 | if (resolution._tag === "Absent") { |
| 480 | firstAbsent ??= resolution |
| 481 | } else { |
| 482 | InternalRecord.assignProperty(values, key, resolution.value) |
| 483 | hasInput = hasInput || resolution.hasInput |
| 484 | } |
| 485 | } |
| 486 | if (firstFailure !== undefined) { |
| 487 | return Effect.fail(evaluationFailure(firstFailure.error, hasInput)) |
| 488 | } |
| 489 | if (firstAbsent !== undefined) { |
| 490 | return hasInput ? Effect.fail(evaluationFailure(firstAbsent.error, true)) : Effect.succeed(firstAbsent) |
| 491 | } |