Things worth studying in Elixir

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:

https://hexdocs.pm/elixir/Enum.html#map_join/3

This allows you to map some data then join it together as a single operation.

https://hexdocs.pm/elixir/Enum.html#min_max/2

This finds the smallest and largest items in an Enumerable by a given definition.

https://hexdocs.pm/elixir/String.html#split/3

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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s