chiark / gitweb /
20b: working on the example
authorBen Harris <bjh21@bjh21.me.uk>
Thu, 30 May 2024 20:24:19 +0000 (21:24 +0100)
committerBen Harris <bjh21@bjh21.me.uk>
Thu, 30 May 2024 20:24:19 +0000 (21:24 +0100)
But not the real input

20/20b.bqn [new file with mode: 0644]

diff --git a/20/20b.bqn b/20/20b.bqn
new file mode 100644 (file)
index 0000000..dbd8ab4
--- /dev/null
@@ -0,0 +1,11 @@
+Prep←•ParseFloat¨
+
+Main←{ 𝕊 orig:
+  Twiddle←{ (1⊸⌽)⌾((1+(¯1+≠𝕩)|𝕨)⊸↑) (⊑𝕩⊐𝕨)⌽𝕩 }
+  Mix←Twiddle´⟜⌽
+  orig ×↩ 811589153
+  cur ← orig Mix˜⍟10 orig
+  +´((≠cur)|(cur⊐0)+⟨1000,2000,3000⟩)⊏cur
+}
+
+•Show Main Prep •file.Lines ⊑•args