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
(initial)
01a done
author
Ben Harris
<bjh21@bjh21.me.uk>
Thu, 2 May 2024 09:43:07 +0000
(10:43 +0100)
committer
Ben Harris
<bjh21@bjh21.me.uk>
Thu, 2 May 2024 09:43:07 +0000
(10:43 +0100)
01/01a.bqn
[new file with mode: 0644]
patch
|
blob
diff --git a/01/01a.bqn
b/01/01a.bqn
new file mode 100644
(file)
index 0000000..
0c2a17c
--- /dev/null
+++ b/
01/01a.bqn
@@ -0,0
+1,13
@@
+SplitOnBlankLines←{
+ blanks ← ""⊸≡¨𝕩
+ blocknums ← +`blanks
+ # Set entries in blocknums to -1 when they correspond with blanks.
+ blocknums ↩ (¯1¨)⌾(blanks⊸/) blocknums
+ blocknums⊔𝕩
+}
+
+Prep←•ParseFloat¨⌾∾
+
+Main←⌈´+´¨
+
+•Show Main Prep SplitOnBlankLines •file.Lines ⊑•args