Advertisement
Guest User

Untitled

a guest
Mar 5th, 2015
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
F# 0.21 KB | None | 0 0
  1. let rec leftTree n x k =
  2.  match n with
  3.  | -1 -> k
  4.  | n -> leftTree (n-1) (x+1) (Node(k, x, Leaf));;
  5.  
  6. let rec rightTree n x k =
  7.  match n with
  8.  | -1 -> k
  9.  | n -> rightTree (n-1) (x+1) (Node(Leaf, x, k));;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement