Check out

New Improvements in Elixir 1.13.0| Elixir Releases

Always upgrade to see the better performance

Malreddy Ankanna
Published in
7 min readDec 10, 2021

--

Elixir 1.13.0 has come up with many improvements. In this article, we cover fewer of them with some code examples and use cases. Here, we cover the following 6 things.

  1. Different ways of using the new function Enum.slide/3
  2. Getting to know the IEX Autocompletion on sigils and structs and struct fields in an iex session
  3. Experiencing the improvement on Syntax Error Report
  4. Experiencing the Power operator ** from Kernel module
  5. How to use the new function Keyword.validate/2
  6. Newly added functions Task.ignore/1 and Task.completed/1

1. Add Enum.slide/3

It is used to slide single or multiple elements in a list. We can specify a single position or range of indices to be slid to the specified index. It also supports the negative index.

All the examples are directly copied from the documentation and created image graphics over the list.

1.1 Sliding a single index element

Slides a single element at the single_index to the insertion_index. The previous element present at the insertion_index moves to the right after the element at single_index inserted at the insertion_index.

An image is better than thousand words

slide a single element

1.2 Sliding backward — a range of elements

This is similar to sliding a single element but you can also specify a range of elements to slide backward at the insertion_index provided. A range of elements jumps to the left.

Here, the insertion_index is less than the lower boundary of the range_index provided.

Check the following example that inserts the elements from the index 3 to index 5 i.e a range 3..5 at position 1

# Slide a range of elements backward

--

--

Malreddy Ankanna
blackode

Programmer & Writer, I write about coding, thoughts, ideas, personal musings, technical articles, and tutorials.https://bio.link/blackode