commit 005eb621720eb030e117621f887aff6bfee9d529
parent 16e3b5ec28a34b121fe938a6496e5ab22b391b85
Author: mpizzzle <m@michaelpercival.xyz>
Date: Sun, 5 Dec 2021 20:46:27 +0000
minor formatting
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/2021/puzzle_1.apl b/2021/puzzle_1.apl
@@ -1,9 +1,9 @@
#! /usr/bin/apl --script
-input←{⍎(⍴x)[2]⍴x←0 ⎕CR ⍵} ⎕FIO[49] 'files/1.txt'
-(+/(((input,0)-(0,input))>0))-1 ⍝ part 1
+input← { ⍎(⍴ x)[2] ⍴ x←0 ⎕CR ⍵ } ⎕FIO[49] 'files/1.txt'
+(+/ (((input, 0) - (0, input)) > 0)) - 1 ⍝ part 1
-i←((0,0),input)+((0,input),0)+((input,0),0)
-(+/(((i,0)-(0,i))>0))-3 ⍝ part 2
+i← ((0, 0), input) + ((0, input), 0) + ((input, 0), 0)
+(+/ (((i, 0) - (0, i)) > 0)) - 3 ⍝ part 2
)OFF