Closed 0xNeshi closed 2 months ago
For this exercise, there are generally two approaches I've seen for implementation. We provide three functions that check if the sides correspond to a particular kind of triangle, returning true or false (see https://github.com/exercism/csharp/blob/main/exercises/practice/triangle/Triangle.cs). The other approach is that we have a single function that checks the sides and returns what kind of triangle it is (see https://github.com/exercism/elixir/blob/main/exercises/practice/triangle/lib/triangle.ex). In the later case, some of the tests should be excluded where a triangle may be more than one type based on the sides.
Any preference?
Let's go with the former version, as it aligns with the "official" problem specification (https://github.com/exercism/problem-specifications/blob/main/exercises/triangle/canonical-data.json).
Towards https://github.com/exercism/cairo/issues/113
Problem specification: https://github.com/exercism/problem-specifications/tree/main/exercises/triangle
TODO:
./bin/fetch-configlet && ./bin/configlet create --practice-exercise triangle