Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.28 KB | None | 0 0
  1. val forLineLengths =  // summary of all the things learned about "for expressions"
  2.     for {
  3.       file <- filesHere
  4.       if file.getName.endsWith(".scala")
  5.       line <- fileLines(file)
  6.       trimmed = line.trim
  7.       if trimmed.matches(".*for.*")
  8.     } yield trimmed.length
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement