def concat(*other)
      if other.size == 1 and (other[0].kind_of?(Erlang::Binary) or other[0].kind_of?(Erlang::Bitstring))
        other = other[0]
      else
        other = Erlang::Binary[*other]
      end
      return other if empty?
      return self if other.empty?
      if @bits == 8
        return to_binary.concat(other)
      else
        bits = (@bits + other.bits) % 8
        head = [*each_bit, *other.each_bit]
        if bits == 0
          return Erlang::Binary[[head.join].pack(BIT_PACK)]
        else
          pad  = 8 - bits
          tail = head[-bits..-1]
          head = head[0...-bits]
          tail = ([0] * pad).concat(tail)
          return Erlang::Bitstring[[[head.join, tail.join].join].pack(BIT_PACK), bits: bits]
        end
      end
    end
def concat(*other)
      if other.size == 1 and (other[0].kind_of?(Erlang::Binary) or other[0].kind_of?(Erlang::Bitstring))
        other = other[0]
      else
        other = Erlang::Binary[*other]
      end
      return other if empty?
      return self if other.empty?
      if @bits == 8
        return to_binary.concat(other)
      else
        bits = (@bits + other.bits) % 8
        head = [*each_bit, *other.each_bit]
        if bits == 0
          return Erlang::Binary[[head.join].pack(BIT_PACK)]
        else
          pad  = 8 - bits
          tail = head[-bits..-1]
          head = head[0...-bits]
          tail = ([0] * pad).concat(tail)
          return Erlang::Bitstring[[[head.join, tail.join].join].pack(BIT_PACK), bits: bits]
        end
      end
    end
Concatenates list of `Binary` or `Bitstring` items into a single `Binary` or `Bitstring`.

 @example
   Erlang::Bitstring[3, bits: 3].concat(Erlang::Bitstring[1, bits: 5])
   # => "a"

 @param iodata [Binary, Bitstring] The list of bitstrings
 @return [Binary, Bitstring]