Skip to content

Commit

Permalink
Day 7 simpler
Browse files Browse the repository at this point in the history
  • Loading branch information
jayfoad committed Dec 7, 2022
1 parent 4cecfee commit 9bad575
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions p7.dyalog
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
⎕IO0 q⎕NGET'p7.txt'1
up{p s (1p)((sp)+@(1p)s)f 1} cd{(0,¨1 0+)f 1} file{p s p((t' 't)+@0s)f 1}
f{p s 1 0¨p:s (0=)'$ cd ..': up '$ cd'4: cd ⎕D⊃⊃: file 1} s⍬⍬ f q
up{p s (1p)((sp)+@(1p)s)}
s1up(1a)a{'.'=:up '$ c'3:0,¨1 0+ ('0',/\⎕D)+@(1 0)}/(q),⍬⍬
+/s/s1E5 part 1
/s/ss-4E7 part 2

0 comments on commit 9bad575

Please sign in to comment.