This is a simple Scala implementation of Tom Scott's 7 Segment Display problem that uses Scala's Streams.
The nice thing about this style of programming is you decouple the logic of processing the giant list of words from what you want to do with them. If you just wished to retrieve the first ten words from the list that are over 10 characters long, you could do that by just changing line 9. You wouldn't then have to rewrite for loops. And you give the compiler opportunities to be clever.
This is quite a useful teaching example. Scala also produces quite sensible, readable code that isn't just code-golfed to hell.