4 ms·
A Supplier is when a function needs a value, and instead of providing a value as an argument, you pass in callable: Foo(int x){return x+1} becomes Foo(Supplier
by fjsolwmv 7y ago
A Supplier is when a function needs a value, and instead of providing a value as an argument, you pass in callable:
Foo(int x){return x+1} becomes Foo(Supplier x){return x() + 1}
- pojzon 7y agoFunction that supplies value, can also encapsulate alot of data generation code. After that you can write a strategy to select which data generation algorithm (supplier) shpuld be used. Thats my cause.
- brigandish 7y agoThanks.