rename part3 to part2 so that it actually makes sense
This commit is contained in:
parent
72b3ecfcbe
commit
9233539ece
1 changed files with 4 additions and 2 deletions
|
@ -79,7 +79,9 @@ const checksum = iter => {
|
|||
.reduce(add)
|
||||
}
|
||||
|
||||
const expand3 = x => x.split('').map(toInt).map((x, i) => ([x, i % 2, i % 2 ? -1 : i / 2]))
|
||||
const expand2 = x => x.split('')
|
||||
.map(toInt)
|
||||
.map((x, i) => ([x, i % 2, i % 2 ? -1 : i / 2]))
|
||||
|
||||
const defrag2 = blocks => {
|
||||
const len = blocks.length - 1
|
||||
|
@ -120,5 +122,5 @@ const checksum2 = blocks => {
|
|||
}
|
||||
|
||||
const part1 = pipe(expand, enfrag, checksum)
|
||||
const part3 = pipe(expand3, defrag2, checksum2)
|
||||
const part2 = pipe(expand2, defrag2, checksum2)
|
||||
|
||||
|
|
Loading…
Reference in a new issue