myanmarking
var date: LocalDateTime = from while (date.isBefore(LocalDateTime.now())) { getDataFromXXX(date = date) date = date.plusHours(1) }
Paul Woitaschek
generateSequence(from) { it.plusHours(1) } .takeWhile { it < LocalDateTime.now() } .forEach(::getDataFromXXX)
A modern programming language that makes developers happier.