Is there an easy way to convert a `Range` to an ar...
# announcements
n
Is there an easy way to convert a
Range
to an array? There is no
reduce
function for Ranges, and although this works, it feels a bit awkward:
Copy code
(0..frames).forEach { i -> duration += animation?.getDuration(i)!! }
i
IntRange
is
Iterable
, so there should be
reduce
and
fold
extension functions available.