Permalink
Browse files

Fix code example formatting

  • Loading branch information...
jwills committed Oct 24, 2011
1 parent 102ae01 commit 34f904ae566c3c4f1f26244508328c8d1602ddac
Showing with 7 additions and 7 deletions.
  1. +7 −7 scrunch/README.md
View
@@ -21,10 +21,10 @@ the Scrunch analogue of the classic WordCount problem:
val pipeline = new Pipeline[WordCountExample]
def wordCount(fileName: String) = {
- pipeline.read(from.textFile(fileName))
- .flatMap(_.toLowerCase.split("\\W+"))
- .filter(!_.isEmpty())
- .count
+ pipeline.read(from.textFile(fileName))
+ .flatMap(_.toLowerCase.split("\\W+"))
+ .filter(!_.isEmpty())
+ .count
}
}
@@ -37,9 +37,9 @@ the second:
class WordCountExample {
def wordGt(firstFile: String, secondFile: String) = {
- wordCount(firstFile).cogroup(wordCount(secondFile))
- .map((k, v) => (k, (v._1.sum - v._2.sum)))
- .filter((k, v) => v > 0).map((k, v) => k)
+ wordCount(firstFile).cogroup(wordCount(secondFile))
+ .map((k, v) => (k, (v._1.sum - v._2.sum)))
+ .filter((k, v) => v > 0).map((k, v) => k)
}
}

0 comments on commit 34f904a

Please sign in to comment.