Addition of a compact_map/2 function to the Enum module

And I was wondering why I can’t quickly find filter_map… It was last directly accessible in the docs all the way back in Elixir 1.4.5, woah.

I understand the liking of the for comprehension and used it a lot but the whole truthy / falsy thing just rings my alarms as I am an other side of the spectrum and I want explicitness all the way to the point of ju-u-ust before it becomes unwieldy and annoying. To me the truthy / falsy semantics will be never welcome but oh well. Just adding one more anecdote because arguing for/against it is fruitless; it’s just a preference in the end, and it is clear that the core team is not on my side in this instance. I’ll just never ever approve of the if value ... thing.

1 Like