[2023][ruby][5.x] remove more duplicate code

main
Alpha Chen 1 year ago
parent 5525e8b7e5
commit 1931b227df
Signed by: alpha
SSH Key Fingerprint: SHA256:3fOT8fiYQG/aK9ntivV3Bqtg8AYQ7q4nV6ZgihOA20g

@ -81,9 +81,6 @@ p dests.map(&:begin).min
# }
# .min
# seeds = seeds
# .each_slice(2)
# .map {|start, length| (start...start+length) }
reversed = mappings
.map {|mapping|
Mapping.new(
@ -98,9 +95,6 @@ reversed = mappings
# seeds.any? { _1.cover?(source) }
# }
# seeds = seeds
# .each_slice(2)
# .map {|start, length| (start...start+length) }
lowest = seeds
.flat_map(&:minmax)
.filter_map {|seed|

Loading…
Cancel
Save