Finding the sum of the digits appearing in the leaves via in-order traversal
Here's a version of the function that I find nicer:

(defn parse [s]
  (apply + (-&gt;&gt; s
             (partition-all 2)                 ; iterate pairs of chars in s
             (map (comp str first))            ; leaf node is the first in the pair
             (filter (partial re-find #"\d"))  ; keep only digits
             (map #(Integer/parseInt %)))))    ; turn 'em into ints


I imagine it can be further reduced to be more idiomatic Clojure, but I find this pretty readable.

Important assumption: this algorithm only works if the input is an inorder traversal of a complete binary tree.  If the original tree was not complete, a single inorder traversal is not sufficient to reconstruct it and find the leaves.