@@ -1263,18 +1263,18 @@ const makePatternKit = () => {
12631263 * @param {CopyArray } elements
12641264 * @param {Pattern } elementPatt
12651265 * @param {bigint } bound Must be >= 1n
1266- * @param {Checker } check
12671266 * @param {CopyArray } [inResults]
12681267 * @param {CopyArray } [outResults]
1268+ * @param {Checker } [check]
12691269 * @returns {boolean }
12701270 */
12711271 const elementsHasSplit = (
12721272 elements ,
12731273 elementPatt ,
12741274 bound ,
1275- check ,
12761275 inResults = undefined ,
12771276 outResults = undefined ,
1277+ check = identChecker ,
12781278 ) => {
12791279 let count = 0n ;
12801280 for ( const element of elements ) {
@@ -1301,18 +1301,18 @@ const makePatternKit = () => {
13011301 * @param {CopyArray<[Key, bigint]> } pairs
13021302 * @param {Pattern } elementPatt
13031303 * @param {bigint } bound Must be >= 1n
1304- * @param {Checker } check
13051304 * @param {CopyArray<[Key, bigint]> } [inResults]
13061305 * @param {CopyArray<[Key, bigint]> } [outResults]
13071306 * @returns {boolean }
1307+ * @param {Checker } [check]
13081308 */
13091309 const pairsHasSplit = (
13101310 pairs ,
13111311 elementPatt ,
13121312 bound ,
1313- check ,
13141313 inResults = undefined ,
13151314 outResults = undefined ,
1315+ check = identChecker ,
13161316 ) => {
13171317 let count = 0n ;
13181318 for ( const [ element , num ] of pairs ) {
@@ -1368,13 +1368,34 @@ const makePatternKit = () => {
13681368 }
13691369 switch ( kind ) {
13701370 case 'copyArray' : {
1371- return elementsHasSplit ( specimen , elementPatt , bound , check ) ;
1371+ return elementsHasSplit (
1372+ specimen ,
1373+ elementPatt ,
1374+ bound ,
1375+ undefined ,
1376+ undefined ,
1377+ check ,
1378+ ) ;
13721379 }
13731380 case 'copySet' : {
1374- return elementsHasSplit ( specimen . payload , elementPatt , bound , check ) ;
1381+ return elementsHasSplit (
1382+ specimen . payload ,
1383+ elementPatt ,
1384+ bound ,
1385+ undefined ,
1386+ undefined ,
1387+ check ,
1388+ ) ;
13751389 }
13761390 case 'copyBag' : {
1377- return pairsHasSplit ( specimen . payload , elementPatt , bound , check ) ;
1391+ return pairsHasSplit (
1392+ specimen . payload ,
1393+ elementPatt ,
1394+ bound ,
1395+ undefined ,
1396+ undefined ,
1397+ check ,
1398+ ) ;
13781399 }
13791400 default : {
13801401 return check ( false , X `unexpected ${ q ( kind ) } ` ) ;
0 commit comments