79266694

Date: 2024-12-09 23:36:20
Score: 1
Natty:
Report link

A succinct way of accomplishing this in modern (2024) Elixir is as follows:

def find_indexes(lst, elem) do
  for {x, i} <- Enum.with_index(lst), x == elem, do: i
end
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: slondr