exercism / exercism/elixir-analyzer

Is Enum.reduce the "best fitting Enum function" for total_quantity in `boutique-inventory`?

Aberta
#433 2 comentários 4 reações 0 responsáveis Ver no GitHub
help wanted 🤝
Linguagem predominante
Elixir
Estrelas
33
Forks
33
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

Solution Implementation:

```elixir
def total_quantity(item) do
Map.values(item.quantity_by_size)
|> Enum.sum()
end

```

The solution says:
image

I agree that `reduce` is a good function/concept to practice with for this solution but "best fitting" seems like a stretch. It took me a long time to understand the concept of `reduce` when learning functional programming and this may be a head scratcher for some folks new to Elixir and functional programming togther.

Would it be possible to change that message to say "Use the Enum.reduce function in the total_quantity function to practice."?

This doesn't give folks who can't figure out `reduce` right away the feeling like they are doing it "wrong".

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.