내가 생각할 수있는 모든 기본 사례로 일부 sml 코드를 작성했지만, 여전히이 경고가 표시됩니다. 따라서 함수는 첫 번째 목록이 두 번째 목록의 순열인지 검사합니다. 그것이 무한 루프에 들어가는 것을 나는 생각할지라도 확실하지 않은 Im!경고 : match nonexhaustive
fun isPermutation(nil: int list, nil: int list): bool = true
| isPermutation(x::nil, nil) = false
| isPermutation(nil, y::nil) = false
| isPermutation(x1::nil, x2::nil) = if (x1=x2) then true else false
| isPermutation(x1::l1, x2::l2) = isPermutation(x1::nil, x2::l2) andalso isPermutation(l1, x2::l2)