2 ms·
Dyalog will sell you a keyboard to go with their APL: https://www.dyalog.com/uploads/images/Business/products/dk_rc.jpg https://www.dyalog.com/uploads/images/Bu
by jodrellblank 7y ago
Dyalog will sell you a keyboard to go with their APL: https://www.dyalog.com/uploads/images/Business/products/dk_rc.jpg https://www.dyalog.com/uploads/images/Business/products/dk_r...
∪ - dyadic downshoe is union ( https://tryapl.org/?a=%27ab%27%20%27cde%27%20%27fg%27%20%u222A%20%27a%27%20%27ab%27&run https://tryapl.org/?a=%27ab%27%20%27cde%27%20%27fg%27%20%u22... )
proper-subset isn't builtin; this might do it, but there are probably neater ways
'ab' 'cde' 'fg' {((≢⊆⍺)>≢⊆⍵)∧(≢⊆⍵)=+/⍺∊⊆⍵} 'cde' 'ab'
"If the count of items of the left vector is greater than the count of the right vector (right side is smaller, it is proper), and the count of the right vector is equal to the number of elements in the right vector which are in the left vector (i.e. all of them are found, it is a subset)". https://tryapl.org/?a=%27ab%27%20%27cde%27%20%27fg%27%20%7B%28%28%u2262%u2286%u237A%29%3E%u2262%u2286%u2375%29%u2227%28%u2262%u2286%u2375%29%3D+/%u237A%u220A%u2286%u2375%7D%20%27cde%27%20%27ab%27&run https://tryapl.org/?a=%27ab%27%20%27cde%27%20%27fg%27%20%7B%...
Not sure it needs "for-all" because functions work on all elements by default. It can have for: loops, but they aren't math-like.