Could you explain the expression to us?
{+⌿⍤2(∘.≤)⍤1⍨⍵}
{ ⍵} ⍝ single argument (monadic) function with argument ⍵
{ ⍨⍵} ⍝ "selfie" - ⍵ f ⍵ where f is (∘.≤)⍤1
{ ⍤1⍨⍵} ⍝ on each row (1 dimensional element)
{ (∘. )⍤1⍨⍵} ⍝ cartesian (outer) product of each row with itself
{ (∘.≤)⍤1⍨⍵} ⍝ ≤ comparison of those elements - produces 6 30×30 boolean matrices
{ ⍤2(∘.≤)⍤1⍨⍵} ⍝ on each of those matricies (2 dimensional element)
{+⌿⍤2(∘.≤)⍤1⍨⍵} ⍝ sum the columns
leading to:
{+⌿⍤2(∘.≤)⍤1⍨⍵} ⍝ compare each row (⍤1) to itself (⍨) and count (+⌿) how many cards that beatsThat make sense?
So, usage would be something like:
CardPower ← {+⌿⍤2(∘.≤)⍤1⍨⍵}
CardPower cardMatrix
Thanks for that follow up comment.