- let matched = middle.value.matched;
- let arrLength = arrange.length;
- let returnRrray = Array(arrange.length);
- arrange.forEach((val, index) => {
- returnRrray[arrange[index]] = matched[index];
- });
- let matchedTmp1Length = matched.length - arrLength;
- console.log(matchedTmp1Length);
- var matchedTmp1 = matched
- .slice(0, matchedTmp1Length);
- console.log("matchedTmp1" + util.inspect(matchedTmp1, { showHidden: true, depth: null }));
- console.log("returnRrray" + util.inspect(returnRrray, { showHidden: true, depth: null }));
- matchedTmp1.push(returnRrray);
- let result = { _tag: "Some",
- value: { matched: matchedTmp1,
- remained: middle.value.remained } };
- return result;