package com.twitter.scalding.examples

import com.twitter.scalding._

class WordCountJob(args: Args) extends Job(args) {
  TypedPipe.from(TextLine(args("input")))
    .flatMap { line: String => line.split("\\s+") }
    .map (_ -> 1L)
    .sumByKey
    .write(TypedTsv[(String, Long)](args("output")))
}

package com.twitter.scalding.examples

import com.twitter.scalding._

class WordCountJob(args: Args) extends Job(args) {
  TextLine(args("input")).read.
    flatMap('line -> 'word) { line: String => line.split("\\s+") }.
    groupBy('word) { _.size }.
    write(Tsv(args("output")))
}

--- 
+++ 
@@ -3,8 +3,9 @@
 import com.twitter.scalding._
 
 class WordCountJob(args: Args) extends Job(args) {
-  TextLine(args("input")).read.
-    flatMap('line -> 'word) { line: String => line.split("\\s+") }.
-    groupBy('word) { _.size }.
-    write(Tsv(args("output")))
+  TypedPipe.from(TextLine(args("input")))
+    .flatMap { line: String => line.split("\\s+") }
+    .map (_ -> 1L)
+    .sumByKey
+    .write(TypedTsv[(String, Long)](args("output")))
 }
Move main simple example to be the typed API, and put the .'s at the start of lines like we usually do
