Simplify day 5 part 1
This commit is contained in:
parent
7ba96ee3e5
commit
1429445efe
@ -23,11 +23,8 @@ puzzle =
|
|||||||
[ \(ranges, vals) ->
|
[ \(ranges, vals) ->
|
||||||
TL.show
|
TL.show
|
||||||
. length
|
. length
|
||||||
. map fst
|
. filter (flip any ranges . isInRange)
|
||||||
. filter (notNull . snd)
|
$ vals
|
||||||
$ map
|
|
||||||
(\v -> (v, mapMaybe (\r -> guard (isInRange v r) $> r) ranges))
|
|
||||||
vals
|
|
||||||
]
|
]
|
||||||
, extraTests = mempty
|
, extraTests = mempty
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user