Implementation of edit distance functions in ML for COMP212