The Swift compiler keeps flagging my use of flatMap suggesting that I use compactMap instead, the only problem being that I use flatMap to flatten sequences of sequences into a single sequence, something that compactMap does not do ( as far as I am aware ). compactMap is great when one needs to eliminate nils from a sequence but it's useless when one wishes to flatten a sequence of sequences. Can someone tell me if there is a replacement for flatMap that gives one the same behaviour as flatMap, the compiler is irritating me no end with this warning ?
Thanks in advance