Refactor 'merge' to be more functional by using array.concat().