aoc2022/aoc.bqn
2022-12-02 07:29:20 +01:00

11 lines
329 B
BQN
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# a‿b Sub x: the b-length subarray starting at a
Sub {ab𝕊𝕩:ba𝕩}
# e Split xs: split xs on occurrences of e (default 0)
Split {Sub𝕩¨ ((1+») ¨ -») /(𝕨0)=𝕩}
Day1 {
sums +´¨ Split •BQN0¨ •FLines 𝕩
sums, +´3sums
}
•Show Day1 •args