DEV Community

Discussion on: Daily Challenge #36 - Let's go for a run!

Collapse
 
hanachin profile image
Seiei Miyagi • Edited

Ruby <3

def runningPace(d, t)
  t.split ?: |> map &:to_r |> then { @1 * 60 + @2 |> quo d |> divmod 60 |> then &"%02d:%02d".:% }
end