July 2018
Intermediate to advanced
242 pages
8h 6m
English
You can practice by implementing your own text-formatting strategies. Try to implement a new text formatting strategy, called capitalizeFormattingStrategy, that will be responsible for capitalizing the first letter of the input text. Once you're done, create a new strategy be composed of the two implemented earlier—lowerCaseFormattingStrategy and capitalizeFormattingStrategy. You can refer to the Function composition recipe in Chapter 3, Shaping Code with Kotlin Functional Programming Features to learn more about the generic way of composing functions together.
Read now
Unlock full access