I dislike `mapSome` because, to me, it implies it will only pass the non-nil 
values of the sequence to the transformation closure.

`compactMap` isn’t an intuitive name, but I could get used to it. The thing I 
like about it is it could be paired with a `compacted` method that removes nils 
from the Sequence of optionals and returns a Sequence of non-optionals. If 
`compacted` is something that makes sense, then it would be nice if 
`compactMap` was just a merger of `map` and `compacted`. I would prefer to find 
a word other than compact that we could use here but I haven’t thought of one 
yet.

In isolation, I think that `filterMap` is best. 
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to