tvl-depot/users/sterni/exercises/aoc/2022/04/4.bqn
sterni 5a41c4c6aa feat(sterni/aoc/2022): day04 BQN solution
Very tired today, but seems like a decently tidy solution.

Change-Id: Id3055159ae99e9b91fcc4b9b41ec7fe5e9a1bc6a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7528
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
2022-12-05 18:58:30 +00:00

11 lines
323 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.

SplitOn, ReadDec •Import "../../lib.bqn"
Sections {
ab ReadDec¨ (<'-') SplitOn 𝕩
(-a) 1+b
}
i 2Sections¨ (<',') SplitOn¨ •FLines "input"
Is ´((¨))
•Out "day04.1: "•Fmt +´(´Is)˘ i
•Out "day04.2: "•Fmt +´(´Is)˘ i