Advertisement
pp2014

Untitled

Oct 2nd, 2014
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. Fixpoint product_of_leaves_acc (t : binary_tree_nat) (a : nat) : nat :=
  2. match t with
  3. | Leaf n => n * a
  4. | Node t1 t2 =>
  5. match a with
  6. | 0 => 0
  7. | n => product_of_leaves_acc t1 (product_of_leaves_acc t2 n)
  8. end
  9. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement