Various ways to solve one well-known riddle
- The classic solution
- In the style of functional programming using a map
- Replacing if-else conditions with enum
- Pipeline-oriented programming approach by immutable objects
- Pipeline-oriented programming approach with callable objects
- Decorator Pattern
- Chain of Responsibility Pattern
- Using a StreamController
- Using a Result object
- Using a Switch. by @PlugFox
- by @PlugFox