about summary refs log tree commit diff stats
path: root/rnd/apl/aoc01_partial.apl
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2022-12-04 15:16:52 -0500
committerelioat <elioat@tilde.institute>2022-12-04 15:16:52 -0500
commit5831542e01209729390f5171d54f505b133ab47e (patch)
tree188391d6e89393849d5b6f53cfb5ca6d994536f5 /rnd/apl/aoc01_partial.apl
parent8f83e6377a7a5e4209f8996c1c9e6870f8ec66b5 (diff)
downloaddecember-2022-5831542e01209729390f5171d54f505b133ab47e.tar.gz
re-org of rnd
Diffstat (limited to 'rnd/apl/aoc01_partial.apl')
-rw-r--r--rnd/apl/aoc01_partial.apl12
1 files changed, 12 insertions, 0 deletions
diff --git a/rnd/apl/aoc01_partial.apl b/rnd/apl/aoc01_partial.apl
new file mode 100644
index 0000000..67d9984
--- /dev/null
+++ b/rnd/apl/aoc01_partial.apl
@@ -0,0 +1,12 @@
+⍝ Look, I told myself I *wouldn't* do AoC 2022,
+⍝ but work slack was too goddamned inticing, so
+⍝ I'm not *really* doing it, but maybe some notes?
+
+⍝ I know nothing about file i/o in APL, so I'm just
+⍝ ignoring that bit of the problem completely. 
+
+⍝ This is the 2nd part for day 1 -- this sorts a
+⍝ vector in descending order and sums the 1st 3 results
+
+  vec ← 40 60 20 110 70 60 40 90 60 80
+  +/vec[3↑⍒vec]