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:
47f51d4
)
05a: slightly prettier ExecuteMove
author
Ben Harris
<bjh21@bjh21.me.uk>
Sun, 5 May 2024 11:58:41 +0000
(12:58 +0100)
committer
Ben Harris
<bjh21@bjh21.me.uk>
Sun, 5 May 2024 11:58:55 +0000
(12:58 +0100)
05/05a.bqn
patch
|
blob
|
history
diff --git
a/05/05a.bqn
b/05/05a.bqn
index 9dcc06589ae15ffac4a7d56fb084dfe038417de8..1efb640e97942925447bc8d633239b6add731f09 100644
(file)
--- a/
05/05a.bqn
+++ b/
05/05a.bqn
@@
-22,8
+22,8
@@
Prep←{
ExecuteMove←{⟨from,to⟩𝕊stacks:
crate←⊑from⊑stacks
- stacks
↩(1⊸↓)⌾(from⊸⊑) stacks
- stacks
↩(⟨crate⟩⊸∾)⌾(to⊸⊑) stacks
+ stacks
(1⊸↓)⌾(from⊸⊑) ↩
+ stacks
(⟨crate⟩⊸∾)⌾(to⊸⊑) ↩
stacks
}