This is confusing but working code. I just want some help in understanding why k::ks is taken as a'list list list and not a'list list. I want to take a list and a list of lists and check whether the first list is necessary. By necessary I mean, whether all of the elements on first list can be found in another.
fun do1(a,[],_)=false
|do1(a,k::ks,n)=if a=List.nth(k,n)orelse do1(a,ks,n) then true else false;
val n=0;
fun do2([],k::ks,_)=[]
|do2(_,[],_)=raise unexpected
|do2(l,k::ks,n)=if List.nth(l,n-1)=0 then do2(l,k::ks,n+1)
else
if do1(l,k::ks,n) then []
else l;
Question Repeated: I just want some help in understanding why k::ks is taken as a'list list list and not a'list list.
Thank You.