In F# this is approximated with:
type 'a IEnumerable with
member this.filterMap f =
[for x in this do if f x <> None then yield (f x).Value]
let j = Map([("a",1) ; ("b",2) ]).filterMap(fun kv -> if kv.Value = 1 then Some(kv.Key,kv.Value) else None) |> Map.ofList
let n = [1.;2.;4.].filterMap(fun x -> if x % 2. = 0. then Some(x**2.) else None)
The extension works with any Sequence (arrays, sequences, maps,etc.) with the caveat that it maps every enumerable to a list. You could also define an extension for a specific type where a broad definition does not make sense.Personally, I lean more functional, I have never run across a need for extending things in this manner.