Advertisement
Guest User

Untitled

a guest
Jan 10th, 2017
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fun num_matches(X, Y) =
  2. if length(X) <> length(Y) then 0
  3. else
  4.      if hd(String.explode(X)) = hd(String.explode(Y)) then 1 + num_matches(String.implode(tl(String.explode(X))),                   String.implode(tl(String.explode(Y))))
  5.      else num_matches(String.implode(tl(String.explode(X))), String.implode(tl(String.explode(Y))));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement