slight day 6 cleanup
This commit is contained in:
parent
04830003a3
commit
366b3950b3
3
6-a.hs
3
6-a.hs
|
@ -4,6 +4,5 @@ markerLength = 4
|
||||||
|
|
||||||
main = interact $
|
main = interact $
|
||||||
show
|
show
|
||||||
. (+ 1)
|
. (+ 1) . head
|
||||||
. (!! 0)
|
|
||||||
. (\l -> filter (\i -> markerLength == length (nub $ map (l !!) [i - (markerLength - 1) .. i])) [(markerLength - 1)..])
|
. (\l -> filter (\i -> markerLength == length (nub $ map (l !!) [i - (markerLength - 1) .. i])) [(markerLength - 1)..])
|
3
6-b.hs
3
6-b.hs
|
@ -5,6 +5,5 @@ markerLength = 14
|
||||||
|
|
||||||
main = interact $
|
main = interact $
|
||||||
show
|
show
|
||||||
. (+ 1)
|
. (+ 1) . head
|
||||||
. (!! 0)
|
|
||||||
. (\l -> filter (\i -> markerLength == length (nub $ map (l !!) [i - (markerLength - 1) .. i])) [(markerLength - 1)..])
|
. (\l -> filter (\i -> markerLength == length (nub $ map (l !!) [i - (markerLength - 1) .. i])) [(markerLength - 1)..])
|
Loading…
Reference in New Issue