Wouldn't it be nice with smart cast in this situat...
# announcements
b
Wouldn't it be nice with smart cast in this situation:
Copy code
listOf( 1, "2", 3 )
        .filter{ it is String }
        .first()
After the filter I know that the values passing through are strings. I don't want to map them as well. The same goes for Rx as well but afaik they don't have smart cast at all. (Wrote a small piece on it here as well https://medium.com/@cc14ff7d5eab/13deeb88cc4f )