14 lines
232 B
JavaScript
14 lines
232 B
JavaScript
|
import * as R from "remeda";
|
||
|
import { comsys } from './part1.js';
|
||
|
|
||
|
|
||
|
export default (instructions) => {
|
||
|
const sys = comsys();
|
||
|
|
||
|
return R.pipe(
|
||
|
R.range(0,3),
|
||
|
R.map( () => sys(instructions.shift()) ),
|
||
|
)
|
||
|
|
||
|
};
|