From: Ben Harris Date: Fri, 3 May 2024 09:26:10 +0000 (+0100) Subject: 03b done X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~bjharris/git?a=commitdiff_plain;h=00d6f670712c49612a11cea3629a2d8f55060bf4;p=aoc-2022.git 03b done Still don't really understand the interaction of ˝ and ˘ though. --- diff --git a/03/03b.bqn b/03/03b.bqn new file mode 100644 index 0000000..9a52f2a --- /dev/null +++ b/03/03b.bqn @@ -0,0 +1,10 @@ +Group←{⟨∘,3⟩⥊𝕩} +Intersect←{(𝕨∊𝕩)/𝕨} # Find elements of 𝕨 that are in 𝕩. + +PriorityLC←{( 1+𝕩-'a')×(𝕩≥'a')∧(𝕩≤'z')} +PriorityUC←{(27+𝕩-'A')×(𝕩≥'A')∧(𝕩≤'Z')} +Priority←PriorityLC+PriorityUC + +Main←{+´(Priority (⊑Intersect´)¨<˘Group𝕩)} + +•Show Main •file.Lines ⊑•args