Skip to content
This repository was archived by the owner on Jun 10, 2024. It is now read-only.

Commit 9cca9bf

Browse files
committed
iluwatar#1842 Improving documentation and README
1 parent edbbb77 commit 9cca9bf

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

currying/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ permalink: /patterns/currying/
66
categories: Functional
77
language: en
88
tags:
9-
- FIGURE OUT WHAT TAG
9+
- Decoupling
1010
---
1111

1212
## Name / classification
1313
Currying
1414

1515
## Intent
1616
Currying decomposes a function that takes multiple arguments into a sequence of functions that each take a single argument.
17-
The parameters of a curried function can be initialised to create a new function with lower arity to perform a more specialised
18-
task.
17+
Curried functions are useful since they can be used to create new functions with lower arity to perform more specialised tasks
18+
in a concise and readable manner. This is done via partial application.
1919

2020
## Explanation
2121
Real-world example

currying/src/main/java/com/iluwatar/currying/Book.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public String toString() {
7171
}
7272

7373
/**
74-
* Curried unary book create functions.
74+
* Curried book builder/creator function.
7575
*/
7676
static Function<Genre, Function<String, Function<String, Function<LocalDate, Book>>>> BOOK_CREATOR
7777
= genre

0 commit comments

Comments
 (0)