Update list.h

improved merge method