Ad
  • Custom User Avatar

    Not an issue?

  • Default User Avatar

    @unclesnottie spoke - I think - about Elixir. In Elixir curly braces don't denote sets but tuples (tuples are ordered). There are many languages in this kata and few languages share the same notation for sets, arrays, tuples, pairs and so on. The aim of the kata is not to return a set but to return according to each language an array of arrays or of pairs or a list of pairs , of tuples or etc...
    I hope the author don't confuse them:-) but it might be possible. Have a look at the description and you will see many notations. I understand that one can be a bit confused, you included:-)

  • Custom User Avatar

    Technically, yes. The use of curly brackets is misleading here (and in my opinion should be omitted, if anything, only the returned object should be possibly considered a set). The description asks for all tuples (a, b), but obviously those tuples also imply (b, a).

    In other words, yes. {15, 21} is the same as {21, 15}, but ((15,21), (21,15)) and {(15, 21), (21, 15)} are perfectly valid notations. It seems the description does not make a distinction between these brackets - which may lead to confusion.

    Under normal circumstances, curly brackets denote a set. In this case, the author appears to confuse the two.