chiark
/
gitweb
/
~bjharris
/
aoc-2022.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf95e7e
)
22a input parsed
author
Ben Harris
<bjh21@bjh21.me.uk>
Sat, 1 Jun 2024 09:29:40 +0000
(10:29 +0100)
committer
Ben Harris
<bjh21@bjh21.me.uk>
Sat, 1 Jun 2024 09:29:40 +0000
(10:29 +0100)
22/22a.bqn
[new file with mode: 0644]
patch
|
blob
diff --git a/22/22a.bqn
b/22/22a.bqn
new file mode 100644
(file)
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