Medium Advanced Reactive Patterns
Switch to Latest with SwitchMap
Create a Flux of "search-1", "search-2", "search-3" (simulating user typing). Use switchMap to process only the latest emission. Each should transform to "Results for: <query>". Print results.
switchMap cancels previous inner publishers when a new element arrives.
Expected
Results for: search-1 Results for: search-2 Results for: search-3
Main.kt