Is this code idiomatic Elixir/functional?

Can you show me please an example?