mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-08-20 02:28:08 +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:
@@ -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