; this should be in the stdlib (func min (lst) (reduce (lambda (acc x) (if (< x acc) x acc)) (rest lst) (first lst))) (func lev (s t) (branch ((eq? 0 (length s)) (length t)) ((eq? 0 (length t)) (length s)) ((eq? (first s) (first t)) (lev (rest s) (rest t))) (#true (+ 1 (min (list (lev s (rest t)) (lev (rest s) t) (lev (rest s) (rest t))))))))