Combine: Handle nil values with compactMap

In some case, you could have your publisher emit some nullable value and don’t want it.

The operator compactMap publish all non-nil element. It can be useful if you don’t want to handle unwrapping in your sink or other combine operators.

You can find the playground here

More informations on Apple documentation

Android & iOS, quality in software is 𝛼&ɷ