Advertisement
GonchuB

CheckTree

Jul 15th, 2013
2,480
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Oz 0.28 KB | None | 0 0
  1. fun {CheckTree T1 T2}
  2.    case T1
  3.    of nil then T2 == nil
  4.    [] tree(K1 V1 TL1 TR1) then
  5.       case T2
  6.       of nil then false
  7.       [] tree(K2 V2 TL2 TR2) then
  8.          K1 == K2 andthen
  9.      V1 == V2 andthen
  10.      {CheckTree TL1 TL2} andthen
  11.      {CheckTree TR1 TR2}
  12.       end
  13.    end
  14. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement