code: @Override
      public void encode(final OtpOutputStream buf) {
          final int arity = elems.length;
  
          buf.write_tuple_head(arity);
  
          for (int i = 0; i < arity; i++) {
              buf.write_any(elems[i]);
          }
      }
docs: Convert this tuple to the equivalent Erlang external representation.
  
  @param buf
  an output stream to which the encoded tuple should be written.