Just what the title says. Its classification seems to imply that the intention was to practice Tuples, but the docs given alongside the functions provided in matrix.ex say:
Given a matrix, return its rows as a list of lists of integers.
and
Given a matrix, return its columns as a list of lists of integers.
And they don’t mention tuples anywhere. The same is true of the main instructions.
“list” can be considered to be somewhat generic, referring to a collection of one or more values.
“Tuple” is a data type that only applies to some tracks.
Right, and specifically on the Elixir track, the Matrix exercise is classified under Structs () and Tuples (×). This should really be Structs and Lists, by which I mean Elixir-specific Lists. I’m asking to fix the categories, not the problem spec instructions or the source file provided to learners.
I.e., I propose changing L1553 and L1559 of the config.
@codingthat You’re totally right. Would you want to help by opening a PR? We would want to remove “tuples” from “practices” and add “lists” to “prerequisites”.
For the record, I don’t want to remove “tuples” from “prerequisites” because there is a part of an example solution that uses tuples. I also don’t want to add “lists” as “practices” because I feel like this exercise is not that heavy on list-related operations. The example solutions uses the Enum module a lot, which is a separate concept in the Elixir track. But there are already 10 exercises that “practices” “enum”, so we can’t add another one. That’s the maximum.
This I don’t quite get — while the problem spec instructions may use “list” generically, the provided matrix.ex specs specifically for Elixir lists as return values, and that’s what the provided tests look for.
Fair enough, I forgot such a maximum existed. Thanks.
The goal of the “practices” field is to choose up to 10 exercises for each concept that best allow you to practice that concept. If you look at the lists concept (elixir/concepts/lists/introduction.md at main · exercism/elixir · GitHub), it’s mainly about the [head | tail] syntax and about functions from the List module. If you look at en example solution to Matrix (elixir/exercises/practice/matrix/.meta/example.ex at main · exercism/elixir · GitHub), you can’t see either the [head | tail] syntax or any usages of the List module. For this reason, I think that Matrix is not a good exercise to practice the lists concept.
Thank you for the PR! It has been merged, so I think this thread could be marked as resolved.