Wrote match algorithm in the Recognize.lhs file.