class Redis

def _scan(command, cursor, args, match: nil, count: nil, type: nil, &block)

def _scan(command, cursor, args, match: nil, count: nil, type: nil, &block)
  # SSCAN/ZSCAN/HSCAN already prepend the key to +args+.
  args << cursor
  args << "MATCH" << match if match
  args << "COUNT" << count if count
  args << "TYPE" << type if type
  synchronize do |client|
    client.call([command] + args, &block)
  end
end