Well, you
can do what you want, but it's rather hackish and usually has some problems.
local mon1, mon2 = peripheral.wrap( "top" ), peripheral.wrap( "left" )
local mon = {} --#make a blank table
for k, v in pairs( mon1 ) do --#iterate through the functions of mon1
mon[ k ] = function( ... ) --#make a new function that calls both monitors' functions.
local result = {v( ... )} --#this'll call mon1's function, and store any values returned
mon2[ k ]( ... ) --#this just calls mon2's function
return unpack( result ) --#this returns whatever mon1's function would've returned.
end
end
mon.write( "Hello" )
Note: If you call something like mon.getSize, the result will be equivalent to calling mon1.getSize, because mon2's results are not store and returned. Theoretically, you could do so, effectively doubling the number of results you get.