1(* Listsort *) 2signature Listsort = 3sig 4 5val sort : ('a * 'a -> order) -> 'a list -> 'a list 6val sorted : ('a * 'a -> order) -> 'a list -> bool 7 8end; 9 10(* 11 [sort ordr xs] sorts the list xs in nondecreasing order, using the 12 given ordering. Uses Richard O'Keefe's smooth applicative merge 13 sort. 14 15 [sorted ordr xs] checks that the list xs is sorted in nondecreasing 16 order, in the given ordering. 17*) 18