From: Ben Harris Date: Sat, 1 Jun 2024 09:29:40 +0000 (+0100) Subject: 22a input parsed X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~bjharris/git?a=commitdiff_plain;h=0cf39c27d95176e1dfc7cda80b099cfb241a162c;p=aoc-2022.git 22a input parsed --- diff --git a/22/22a.bqn b/22/22a.bqn new file mode 100644 index 0000000..cc04f7b --- /dev/null +++ b/22/22a.bqn @@ -0,0 +1,6 @@ +PrepMap←{ >(⌈´≠¨𝕩)⊸↑¨𝕩 } +PrepStep←{ 𝕊"L": 'L'; 𝕊"R": 'R'; •ParseFloat 𝕩 } +PrepPath←{ PrepStep¨(+`⟨0⟩∾≠˝⍉2↕𝕩∊"LR")⊔𝕩 } +Prep←{ ⟨ PrepMap ¯2↓𝕩, PrepPath ¯1⊑𝕩 ⟩ } + +•Show Prep •file.Lines ⊑•args