i want to write program that can checked a list is sorted or not in ml language program but i am new at this language
i write the below code and seems it works
is there any tips i can use in my ml programing
ml programming language
let issorted x = match x with
[] -> true
| _::[] -> true
| _::_ -> issorted_helper (x);;
let rec issorted_helper x = match x with
| [] -> true
| h::t ->
if h > t
false
else
issorted_helper(t);;