Commit 5c6a656 1 parent de31c5a commit 5c6a656 Copy full SHA for 5c6a656
File tree 2 files changed +4
-7
lines changed
2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -4,5 +4,3 @@ import Aoc2024.Utils
4
4
import Std
5
5
6
6
def parseGrid (s : String) : Grid := s.lines.map (·.toList)
7
-
8
- -- #guard parseReports exampleInput == Except.ok 42
Original file line number Diff line number Diff line change @@ -54,11 +54,10 @@ private def slidingGrids (grid : Grid): List Grid :=
54
54
]
55
55
56
56
private def is2Mas : Grid -> Bool
57
- | [r1, r2, r3] =>
58
- let match1 := match r1 with | ['M' , _, 'S' ] => true | _ => false
59
- let match2 := match r2 with | [_, 'A' , _] => true | _ => false
60
- let match3 := match r3 with | ['M' , _, 'S' ] => true | _ => false
61
- match1 && match2 && match3
57
+ | [
58
+ ['M' , _, 'S' ],
59
+ [ _, 'A' , _],
60
+ ['M' , _, 'S' ]] => true
62
61
| _ => false
63
62
64
63
private def rotate90 : Grid -> Grid := flipHorizontal ∘ List.transpose
You can’t perform that action at this time.
0 commit comments