Deal: Difference between revisions

Jump to navigation Jump to search
No change in size ,  16:54, 8 February 2023
fixed typo
m (Text replacement - "</source>" to "</syntaxhighlight>")
Tags: Mobile edit Mobile web edit
(fixed typo)
 
Line 1: Line 1:
{{Built-in|Deal|?}} is a [[dyadic]] [[primitive function]] which returns a random [[wikipedia:permutation#k-permutations of n|partial permutation]]. The name ''Deal'' comes from the analogy of [[wikipedia:card game#deal|dealing cards]] in a card game such as Poker. Both [[argument|arguments]] of <syntaxhighlight lang=apl inline>k?n</syntaxhighlight> must be non-negative integer [[scalar|scalars]] with <syntaxhighlight lang=apl inline>k≤n</syntaxhighlight>, and Deal generates a random k-permutation by selecting <syntaxhighlight lang=apl inline>k</syntaxhighlight> numbers from the first <syntaxhighlight lang=apl inline>n</syntaxhighlight> [[Index|indices]] without replacement. Deal shares the [[glyph]] <syntaxhighlight lang=apl inline>?</syntaxhighlight> with the monadic scalar function [[Roll]].
{{Built-in|Deal|?}} is a [[dyadic]] [[primitive function]] which returns a random [[wikipedia:permutation#k-permutations of n|partial permutation]]. The name ''Deal'' comes from the analogy of [[wikipedia:card game#Deal|dealing cards]] in a card game such as Poker. Both [[argument|arguments]] of <syntaxhighlight lang=apl inline>k?n</syntaxhighlight> must be non-negative integer [[scalar|scalars]] with <syntaxhighlight lang=apl inline>k≤n</syntaxhighlight>, and Deal generates a random k-permutation by selecting <syntaxhighlight lang=apl inline>k</syntaxhighlight> numbers from the first <syntaxhighlight lang=apl inline>n</syntaxhighlight> [[Index|indices]] without replacement. Deal shares the [[glyph]] <syntaxhighlight lang=apl inline>?</syntaxhighlight> with the monadic scalar function [[Roll]].


== Examples ==
== Examples ==
1

edit

Navigation menu