It’s worth looking over the basics libraries of a language from time to time to see if you have missed anything useful.
For example Elixir has the very useful:
This allows you to map some data then join it together as a single operation.
This finds the smallest and largest items in an Enumerable by a given definition.
This splits a string on a pattern and allows you to drop the empty elements. This is especially useful if there are patterns that you want to filter out as well. One iteration will split and remove the irrelevant items.