Closed lancelote closed 3 years ago
Example implementation file
fun max1(xs : int list) = if null xs then NONE else let val tl_ans = max1(tl xs) in if isSome tl_ans andalso valOf tl_ans > hd xs then tl_ans else SOME (hd xs) end
... test file
val test3 = valOf(max1 []);
... result
uncaught exception Option raised at: smlnj/init/pre-perv.sml:25.28-25.34
sml-test reports nothing.
sml-test
Example implementation file
... test file
... result
sml-test
reports nothing.