chiark / gitweb /
10b done
authorBen Harris <bjh21@bjh21.me.uk>
Fri, 10 May 2024 08:41:26 +0000 (09:41 +0100)
committerBen Harris <bjh21@bjh21.me.uk>
Sat, 11 May 2024 10:01:54 +0000 (11:01 +0100)
10/10a.bqn
10/10b.bqn [new file with mode: 0644]

index 7df5b7002add648efc709ba816358defbcaa0a8f..b3ac52d685f382e0a9ccaef4235eefec68d3b47f 100644 (file)
@@ -12,7 +12,7 @@ Insn←{
 Prep←{Insn(' '⊸=⊸Split 𝕩)}
 
 Main←{
-  cnâ\86\901+â\86\95â\8a\91â\89¢𝕩
+  cnâ\86\901+â\86\95â\89 𝕩
   xs←1+`𝕩
   +´cn×xs×20=40|cn
 }
diff --git a/10/10b.bqn b/10/10b.bqn
new file mode 100644 (file)
index 0000000..5de9f52
--- /dev/null
@@ -0,0 +1,20 @@
+Split←{
+  blocknums ← +`𝕨
+  # Set entries in blocknums to -1 when they correspond with delimiters.
+  blocknums ↩ (¯1¨)⌾(𝕨⊸/) blocknums
+  blocknums⊔𝕩
+}
+
+Insn←{
+  𝕊⟨"noop"⟩:⟨0⟩;
+  𝕊⟨"addx",v⟩:⟨0,•ParseFloat v⟩
+}
+Prep←{Insn(' '⊸=⊸Split 𝕩)}
+
+Main←{
+  bp←40|↕≠𝕩
+  xs←1+`𝕩
+  ⟨6,40⟩⥊ ".#"⊏˜1≥|xs-bp
+}
+
+•Show Main »∾Prep¨ •file.Lines ⊑•args