
  -spec setelement(Index, Tuple1, Value) -> Tuple2
                      when
                          Index :: pos_integer(),
                          Tuple1 :: tuple(),
                          Tuple2 :: tuple(),
                          Value :: term().

  Returns a tuple that is a copy of argument Tuple1 with the
  element specified by integer argument Index (the first element
  is the element with index 1) replaced by argument Value, for
  example:

    > setelement(2, {10, green, bottles}, red).
    {10,red,bottles}
