Update code.oz

Created Merge function + 2 subfunctions