Skip to content

Commit

Permalink
Suggestions by @nomisRev
Browse files Browse the repository at this point in the history
  • Loading branch information
serras committed Oct 16, 2024
1 parent f45caad commit 38e9cf2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions content/blog/2024-10-04-arrow-2-0.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ empower developers to write more succinct and readable code.

One of the core concepts when working with typed errors is the distinction
between fail-first and [accumulation of errors](/learn/typed-errors/working-with-typed-errors/#accumulating-different-computations). Until now, the latter mode
required using `parZip` and `parMap`, which sometimes obscure the actual
required using `zipOrAccumulate` and `mapOrAccumulate`, which sometimes obscure the actual
flow of the computation.

In Arrow 2.0 we have sprinkled some DSL dust over `Raise`, and now you can
Expand All @@ -38,13 +38,13 @@ general, any `RaiseAccumulate`) you use `by accumulating` to execute some
computation keeping all the errors.

```kotlin
// version with parZip
parZip(
// version with `zipOrAccumulate`
zipOrAccumulate(
{ checkOneThing() },
{ checkOtherThing() }
) { a, b -> doSomething(a, b) }

// version with accumulate
// version with `accumulate`
accumulate {
val a by accumulating { checkOneThing() }
val b by accumulating { checkOtherThing() }
Expand Down

0 comments on commit 38e9cf2

Please sign in to comment.