   `(let [~context-sym (sparkling.core/spark-context ~conf)]
      (try
        ~@body
-       (finally (stop ~context-sym)))))+       (finally (stop ~context-sym)))))

    (u/unmangle-fn f)))

(defn flat-map-values
  [f rdd]
  (u/set-auto-name
    (.flatMapValues rdd (function f))

      (u/set-auto-name (u/unmangle-fn f))))

(defn map-values [f rdd]
  "Returns a new `JavaPairRDD` of (K,V) pairs by applying `f` to all values in the 
  pair-rdd `rdd`"  
  (-> (.mapValues rdd (function f))
      (u/set-auto-name (u/unmangle-fn f))))

