Skip to content

Instantly share code, notes, and snippets.

@ThomasAlexandre
Last active September 23, 2015 20:55
Show Gist options
  • Save ThomasAlexandre/5b9075a36c0e0edc08b6 to your computer and use it in GitHub Desktop.
Save ThomasAlexandre/5b9075a36c0e0edc08b6 to your computer and use it in GitHub Desktop.
import org.joda.time._
val dateStream: Stream[LocalDate] = {
def loop(ld: LocalDate): Stream[LocalDate] = ld #:: loop(ld plusDays 1)
loop(LocalDate.now())
}
dateStream.take(18).toList
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment