Format
This commit is contained in:
parent
d0488726a0
commit
25efc19b31
@ -13,7 +13,8 @@ puzzle =
|
|||||||
{ number = 8
|
{ number = 8
|
||||||
, parser = \isRealData -> (if isRealData then 1000 else 10,) <$> (V3 <$> decimal <* single ',' <*> decimal <* single ',' <*> decimal) `sepEndBy` newline
|
, parser = \isRealData -> (if isRealData then 1000 else 10,) <$> (V3 <$> decimal <* single ',' <*> decimal <* single ',' <*> decimal) `sepEndBy` newline
|
||||||
, parts =
|
, parts =
|
||||||
[ uncurry \n -> TL.show
|
[ uncurry \n ->
|
||||||
|
TL.show
|
||||||
. product
|
. product
|
||||||
. take 3
|
. take 3
|
||||||
. sortOn Down
|
. sortOn Down
|
||||||
@ -22,7 +23,8 @@ puzzle =
|
|||||||
. snd
|
. snd
|
||||||
. (!! n)
|
. (!! n)
|
||||||
. connectBoxes
|
. connectBoxes
|
||||||
, uncurry . const $ TL.show
|
, uncurry . const $
|
||||||
|
TL.show
|
||||||
. maybe (error "sets never unified") (\((V3 x1 _ _, V3 x2 _ _), _) -> x1 * x2)
|
. maybe (error "sets never unified") (\((V3 x1 _ _, V3 x2 _ _), _) -> x1 * x2)
|
||||||
. lastMay
|
. lastMay
|
||||||
. takeWhile ((> 1) . DS.sets . snd)
|
. takeWhile ((> 1) . DS.sets . snd)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user