style: indent case branches

This commit is contained in:
Kiana Sheibani 2024-12-05 07:21:55 -05:00
parent d0a2aaef36
commit 20af31beda
Signed by: toki
GPG key ID: 6CB106C25E86A9F7
2 changed files with 4 additions and 4 deletions

View file

@ -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"

View file

@ -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