I just upgrade OTP to 20.0 and elixir to 1.5.0-rc.1, I got warnings on usage of filter_map. Why is it deprecated?
Changelog for 1.5 says:
[Enum] Deprecate Enum.filter_map/3 in favor of Enum.filter/2 + Enum.map/2 or for-comprehensions
Yes, 'filter+map' or 'for' works, but I want to know the reason behind it.
I think the reason was the fact that it was an outlier. The only "fused" function.
Enum.map_join = Enum.map + Enum.join
Enum.flat_map = Enum.map + Enum.concat