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:
03db791
)
23b: use namespace for loop variable rather than list
author
Ben Harris
<bjh21@bjh21.me.uk>
Fri, 14 Jun 2024 09:17:04 +0000
(10:17 +0100)
committer
Ben Harris
<bjh21@bjh21.me.uk>
Fri, 14 Jun 2024 09:17:04 +0000
(10:17 +0100)
23/23b.bqn
patch
|
blob
|
history
diff --git
a/23/23b.bqn
b/23/23b.bqn
index 8b5a1ac5e67d52b799d8cf52ac75a1de8d0d8b68..6ae9b64cfddd7647646a43a176d1fc1655c07a90 100644
(file)
--- a/
23/23b.bqn
+++ b/
23/23b.bqn
@@
-38,12
+38,12
@@
Round←{𝕊map:
Trim map
}
-Main←{
- ⟨i
,·,·
⟩←{
- 𝕊⟨i,this
,prev⟩:⟨i+1,Round this,this⟩
+Main←{
𝕊map:
+ ⟨i⟩←{
+ 𝕊⟨i,this
⟩: {i⇐i+1, prev⇐this, this⇐Round this}
} •_while_ {
- 𝕊⟨
·,this,prev⟩:
this≢prev
- }
⟨0,𝕩,@⟩
+ 𝕊⟨
prev,this⟩:
this≢prev
+ }
{i⇐0, prev⇐@, this⇐map}
i
}