One List Entirely In Another List?
-
Goddammit, Mux. I want to know if the list '1.3' (%qm) is entirely in the list '1.2.3.4.5' (%qv).
The best I have so far:
eq( words( setinter( %qv, %qm, . ), . ), words( %qm, . )
There has to be a better way.
-
Don't think so, you'd have to munge your first list with wildcards to use strmatch and I don't know if that's a gain at all over what you got.
-
strmatch(setinter(%qm,%qv,.),sort(%qm,,.))
Edit: tablet typos
-
You could reverse it:
setdiff(%qm, %qv, .)
If anything returns, it's not a subset, otherwise it is.