style: indent case branches
This commit is contained in:
parent
d0a2aaef36
commit
20af31beda
|
@ -63,7 +63,7 @@ checkString board str = go (unpack str)
|
|||
go [] _ _ = True
|
||||
go (c :: cs) pos dir =
|
||||
let Just next = moveDir dir pos
|
||||
| Nothing => False
|
||||
| Nothing => False
|
||||
in index next board == c && go cs next dir
|
||||
|
||||
|
||||
|
@ -88,5 +88,5 @@ export
|
|||
solution : String -> Maybe Nat
|
||||
solution inp =
|
||||
let Just (_ ** _ ** board) = parseInput inp
|
||||
| Nothing => Nothing
|
||||
| Nothing => Nothing
|
||||
in Just $ countString board "XMAS"
|
||||
|
|
|
@ -14,7 +14,7 @@ checkMS board pos =
|
|||
let Just [ul, ur, dl, dr] =
|
||||
map (map (`index` board))
|
||||
$ traverse {t=Vect _} (`moveDir` pos) [UL, UR, DL, DR]
|
||||
| Nothing => False
|
||||
| Nothing => False
|
||||
in ((ul == 'M' && dr == 'S') || (ul == 'S' && dr == 'M')) &&
|
||||
((ur == 'M' && dl == 'S') || (ur == 'S' && dl == 'M'))
|
||||
|
||||
|
@ -27,5 +27,5 @@ export
|
|||
solution : String -> Maybe Nat
|
||||
solution inp =
|
||||
let Just (_ ** _ ** board) = parseInput inp
|
||||
| Nothing => Nothing
|
||||
| Nothing => Nothing
|
||||
in Just $ countMAS board
|
||||
|
|
Loading…
Reference in a new issue