Fix spelling error: Genre.FANTAST (#2512)

This commit is contained in:
trananso
2023-07-02 04:53:48 -04:00
committed by GitHub
parent 294366ac65
commit 70d6cb6c9b
+2 -2
View File
@@ -100,7 +100,7 @@ Book withPublicationDate(LocalDate publicationDate);
The semantics of the `builder` function can easily be understood. The `builder` function returns a function `AddGenre`, which adds the genre to the book. Similarity, the `AddGenre` function returns another function `AddTitle`, which adds the title to the book and so on, until the `AddPublicationDate` function returns a `Book`.
For example, we could create a `Book` as follows:
```java
Book book = Book.builder().withGenre(Genre.FANTAST)
Book book = Book.builder().withGenre(Genre.FANTASY)
.withAuthor("Author")
.withTitle("Title")
.withPublicationDate(LocalDate.of(2000, 7, 2));
@@ -188,4 +188,4 @@ Cons
## Credits
* [Currying in Java](https://www.baeldung.com/java-currying)
* [What Is Currying in Programming](https://towardsdatascience.com/what-is-currying-in-programming-56fd57103431#:~:text=Currying%20is%20helpful%20when%20you,concise%2C%20and%20more%20readable%20solution.)
* [Why the fudge should I use currying?](https://medium.com/dailyjs/why-the-fudge-should-i-use-currying-84e4000c8743)
* [Why the fudge should I use currying?](https://medium.com/dailyjs/why-the-fudge-should-i-use-currying-84e4000c8743)