Yep, you're correct that filter_map isn't technically needed here and filter would have worked. My original intent was for that to be different, but I left it to mention the function mostly.
TIL: Range#cover? - Will update later today to mention that.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Yep, you're correct that
filter_map
isn't technically needed here andfilter
would have worked. My original intent was for that to be different, but I left it to mention the function mostly.TIL:
Range#cover?
- Will update later today to mention that.