```var date: LocalDateTime = from while (date.isBe...
# codereview
m
Copy code
var date: LocalDateTime = from
while (date.isBefore(LocalDateTime.now())) {
    getDataFromXXX(date = date)
    date = date.plusHours(1)
}
p
What is getDataFromXXX supposted to do?
m
doesn't matter. it's an iterative call
basically, i need to call that functions multiple times, until certain condition
p
Copy code
generateSequence(from) { it.plusHours(1) }
        .takeWhile { it < LocalDateTime.now() }
        .forEach(::getDataFromXXX)
­čĄę 1
m
exactly. thank you very much