diff options
Diffstat (limited to 'samples/aoc/2018/01/solve.bruijn')
-rw-r--r-- | samples/aoc/2018/01/solve.bruijn | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/samples/aoc/2018/01/solve.bruijn b/samples/aoc/2018/01/solve.bruijn index 0fd0448..3d26a2e 100644 --- a/samples/aoc/2018/01/solve.bruijn +++ b/samples/aoc/2018/01/solve.bruijn @@ -5,10 +5,9 @@ part1 ∑‣ ⧗ (List FrequencyDiff) → Frequency -part2 z [[[[rec]]]] S.empty (+0) ⧗ (List FrequencyDiff) → Frequency - rec (S.has? 1 2) case-end case-cont - case-cont 3 (S.add 1 2) (1 + ^0) ~0 - case-end 1 +part2 z [[[[rec]]]] S.empty (+0) + rec S.has? 1 2 1 go + go 3 (S.add 1 2) (1 + ^0) ~0 main [parts nums] nums string→signed-number <$> (init (lines 0)) |