Skip to content

Commit 65637c4

Browse files
committed
Minor corrections
1 parent 74b1d98 commit 65637c4

File tree

1 file changed

+4
-4
lines changed
  • src/pages/articles/2021-07-07---huh-to-aha-a-refactoring-story

1 file changed

+4
-4
lines changed

src/pages/articles/2021-07-07---huh-to-aha-a-refactoring-story/index.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ static List<Either<Tuple2<ID, Failure>, ImmutableEgg>> filterDuplicates(
185185

186186
![partial-failures-with-either-2](media/either-validate.png)
187187

188-
- This also avoids the need for intermediate filtering between steps, coz all the failures contained in `Either.`left`are auto-skipped from processing downstream. This is possible due to the **Monad** property of`Either`.
188+
- This also avoids the need for intermediate filtering between steps, coz all the failures contained in `Either.left` are auto-skipped from processing downstream. This is possible due to the **Monad** property of `Either`.
189189

190190
```java
191191
static Either<Tuple2<ID, Failure>, ImmutableEgg> validate(
@@ -199,7 +199,7 @@ static Either<Tuple2<ID, Failure>, ImmutableEgg> validate(
199199
}
200200
```
201201

202-
Monad is out of scope to be covered here, but I have an entire 1 hour talk about this, which can help you fill in this missing piece:
202+
Monad is out of scope to be covered here, but I have a blog post [Monads for Drunken Coders](/posts/monads-for-drunken-coders-pint-1/) and an entire 1 hour talk about this, which can help you fill in this missing piece:
203203

204204
- [Java Version](/my-talks/#Fight-Complexity-with-Functional-Programming-Java)
205205
- [Kotlin Version](/my-talks/#Fight-Complexity-with-Functional-Programming-Kotlin)
@@ -367,7 +367,7 @@ Let's do the same in code:
367367
}</string,></string,>
368368
369369
````
370-
- Now, We can focus on testing just the signal part.
370+
- Now, we can focus on testing just the signal part.
371371
- This [BiConsumer](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/BiConsumer.html) is agnostic of what's passed, so we can cleverly use a `HashMap::put` to test this function.
372372
- As our code turns testable, we don't need magical mocking frameworks or **over-granular testing** to achieve ~95% test coverage. We can easily write highly targeted tests.
373373
@@ -382,7 +382,7 @@ public EggService(
382382
@Qualifier(EGG_REPO) EggRepo eggRepo,
383383
...
384384
)
385-
````
385+
```
386386

387387
But if all you need is a function from a Dependency, resist injecting the entire object. Instead, inject only the function that you need.
388388

0 commit comments

Comments
 (0)