(values, pairof = pair)
| 1069 | } |
| 1070 | |
| 1071 | function pairs(values, pairof = pair) { |
| 1072 | const pairs = []; |
| 1073 | let previous; |
| 1074 | let first = false; |
| 1075 | for (const value of values) { |
| 1076 | if (first) pairs.push(pairof(previous, value)); |
| 1077 | previous = value; |
| 1078 | first = true; |
| 1079 | } |
| 1080 | return pairs; |
| 1081 | } |
| 1082 | |
| 1083 | function pair(a, b) { |
| 1084 | return [a, b]; |
nothing calls this directly
no outgoing calls
no test coverage detected