Last active
December 2, 2020 15:57
-
-
Save xpqz/cc47760812c96b9618324f613a1d4de4 to your computer and use it in GitHub Desktop.
AoC 2020 Day 02, Dyalog APL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
⎕IO←1 | |
'segs'⎕CY'dfns' | |
DAY02←⍎¨@1 2¨'- :'∘segs¨⊃⎕NGET'data/2020/day02.txt'1 | |
+⌿↑{(b t l s)←⍵⋄((b∘≤∧t∘≥)+/l=s)(⊃(l=b⊃s)≠l=t⊃s)}¨DAY02 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment