chiark / gitweb /
01b done
authorBen Harris <bjh21@bjh21.me.uk>
Thu, 2 May 2024 09:59:51 +0000 (10:59 +0100)
committerBen Harris <bjh21@bjh21.me.uk>
Thu, 2 May 2024 09:59:51 +0000 (10:59 +0100)
01/01b.bqn [new file with mode: 0644]

diff --git a/01/01b.bqn b/01/01b.bqn
new file mode 100644 (file)
index 0000000..9f83089
--- /dev/null
@@ -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←{+´3↑∨+´¨𝕩}
+
+•Show Main Prep SplitOnBlankLines •file.Lines ⊑•args