Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fun num_matches(X, Y) =
- if length(X) <> length(Y) then 0
- else
- 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))))
- 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