If you are a seasoned reactive developer, you may miss the map, flatMap, concatMap methods.
The Mutiny API is quite different from the standard reactive eXtensions API.
There are multiple reasons for this choice.
Typically, flatMap is not necessarily well understood by every developer, leading to potentially catastrophic consequences.
That being said, Mutiny provides the map, flatMap and concatMap methods, implementing the most common variant for each:
intresult=uni.onItem().transform(i->i+1).await().indefinitely();intresult2=uni.onItem().transformToUni(i->Uni.createFrom().item(i+1)).await().indefinitely();// Shortcut for .onItem().transformToUniintresult3=uni.chain(i->Uni.createFrom().item(i+1)).await().indefinitely();List<Integer>list=multi.onItem().transform(i->i+1).collect().asList().await().indefinitely();List<Integer>list2=multi.onItem().transformToMultiAndMerge(i->Multi.createFrom().items(i,i)).collect().asList().await().indefinitely();// Equivalent to transformToMultiAndMerge but let you configure the flattening process,// failure management, concurrency...List<Integer>list3=multi.onItem().transformToMulti(i->Multi.createFrom().items(i,i)).merge().collect().asList().await().indefinitely();List<Integer>list4=multi.onItem().transformToMultiAndConcatenate(i->Multi.createFrom().items(i,i)).collect().asList().await().indefinitely();// Equivalent to transformToMultiAndConcatenate but let you configure the flattening process,// failure management...List<Integer>list5=multi.onItem().transformToMulti(i->Multi.createFrom().items(i,i)).concatenate().collect().asList().await().indefinitely();