Ranking poker hands: Difference between revisions
Jump to navigation
Jump to search
no edit summary
Miraheze>Marshall |
Miraheze>Marshall No edit summary |
||
Line 3: | Line 3: | ||
== Dyalog '19 version == | == Dyalog '19 version == | ||
Marshall Lochbaum showed the following code in a presentation (D04: "Tacit Techniques with Dyalog version 18.0 Operators") at the [https://www.dyalog.com/user-meetings/dyalog19.htm Dyalog '19] user meeting. | Marshall Lochbaum showed the following code in a presentation (D04: "Tacit Techniques with Dyalog version 18.0 Operators"; video [https://dyalog.tv/Dyalog19/?v=czWC4tjwzOQ here]) at the [https://www.dyalog.com/user-meetings/dyalog19.htm Dyalog '19] user meeting. | ||
<source lang=apl> | <source lang=apl> | ||
handrank←{⊃{((8|@1⊢2-/⍺)⍵∧.=¨1,⊃⍵){(∧/⍺),(2=≢⍵),⍺,⊂⍵[⍒⍵;]⊖⍨⊃⍺},⍨∘≢⌸⍺}/↓⍉⍵[⍒⍵;]} | handrank←{⊃{((8|@1⊢2-/⍺)⍵∧.=¨1,⊃⍵){(∧/⍺),(2=≢⍵),⍺,⊂⍵[⍒⍵;]⊖⍨⊃⍺},⍨∘≢⌸⍺}/↓⍉⍵[⍒⍵;]} |