mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-12 22:14:41 +00:00
docs: diagrams for callback, circuit breaker, client session, collecting parameter, colletion pipeline, combinator, command, commander, component, composite entity, composite view, composite, context object, converter, crtp, currying
This commit is contained in:
1 parent
d5a46be3c5
commit
0509fabe8e
31 files changed
+60
-1
No files matched your search
@@ -33,6 +33,10 @@ Wikipedia says
|
||||
|
||||
> In mathematics and computer science, currying is the technique of translating a function that takes multiple arguments into a sequence of families of functions, each taking a single argument.
|
||||
|
||||
Sequence diagram
|
||||
|
||||

|
||||
|
||||
## Programmatic example of Currying Pattern in Java
|
||||
|
||||
Consider a librarian who wants to populate their library with books. The librarian wants functions which can create books corresponding to specific genres and authors. Currying makes this possible by writing a curried book builder function and utilising partial application.
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 68 KiB |
Reference in new issue
Block a user