Write a function allLessThan
. It takes two list of integers and test if all integers in the first list are less than all integers in the second list.
For example allLessThan([2,4], [6,7,8])
would return true
I've tried to set up the function in terms of letting the sets equal xx
and yy
so that if every element in xx
is less than every element in yy
then the function would return true, but if not would return false.
- fun allLessThan([], yy) = true
= | allLessThan(xx, []) = false
= | allLessThan(x::xRest, y::yRest)