Last active
September 23, 2015 20:55
-
-
Save ThomasAlexandre/5b9075a36c0e0edc08b6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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