It seems that f is the function of reducing three parameters, a is the neutral element of our reduction, and t is the root, therefore:
for a binary type (I don't remember the syntax of the variant variants very well, so please be condescending)
let r = Node(Node(Node(Leaf,3,Leaf),2,Node(Leaf,4,Leaf)),1,Node(Node(Leaf,6,Leaf),5,Node(Leaf,7,Leaf)))
if you want to sum all the nodes, the function will be called as:
let add xyz = x + y + z fold_tree add 0 r
and we get t as node, so we have:
(add 1 (fold_tree add 0 Node(Node(Leaf,3,Leaf),2,Node(Leaf,4,Leaf))) (fold_tree add 0 Node(Node(Leaf,6,Leaf),5,Node(Leaf,7,Leaf))))
if we open it a little more, we get:
(add 1 (add 2 (fold_tree add 0 Node(Leaf,3,Leaf)) (fold_tree add 0 Node(Leaf,4,Leaf))) (add 5 (fold_tree add 0 Node(Leaf,6,Leaf)) (fold_tree add 0 Node(Leaf,7,Leaf))))
and again, we map the leaves:
(add 1 (add 2 (add 3 0 0) (add 4 0 0)) (add 5 (add 6 0 0) (add 7 0 0)) (add 1 (add 2 3 4) (add 5 6 7)) (add 1 9 18)
to finally get:
28
Hope this helps.