 
 (defn flat-map
   "Similar to `map`, but each input item can be mapped to 0 or more output items (so the
-   function `f` should return a collection rather than a single item)"
+  function `f` should return a collection rather than a single item)"
   [rdd f]
   (.flatMap rdd (flat-map-function f)))
 


(defn aggregate
  "Aggregates the elements of each partition, and then the results for all the partitions,
   using a given combine function and a neutral 'zero value'."
  [rdd zero-value seq-op comb-op]
  (.aggregate rdd zero-value (function2 seq-op) (function2 comb-op)))



(defn save-as-sequence-file
  "Writes the elements of `rdd` as a Hadoop SequenceFile in a given `path`
  in the local filesystem, HDFS or any other Hadoop-supported file system.
  This is available on RDDs of key-value pairs that either implement Hadoop's
  Writable interface."
  [rdd path]
  (.saveAsSequenceFile rdd path))

