Closed romge closed 3 years ago
Adds a new method "apply" to the Ansi class. This is especially useful when used with lambdas. Applying other functions to the Ansi class is now possible without breaking out of the fluent API flow. This is best shown with the following example:
Before:
Ansi ansi = Ansi.ansi().fgRed(); complexFunction(ansi); ansi.reset();
Now:
Ansi ansi = Ansi.ansi().fgRed().apply(this::complexFunction).reset();
Adds a new method "apply" to the Ansi class. This is especially useful when used with lambdas. Applying other functions to the Ansi class is now possible without breaking out of the fluent API flow. This is best shown with the following example:
Before:
Now: