Roll: Difference between revisions

Jump to navigation Jump to search
57 bytes added ,  22:30, 2 November 2019
no edit summary
Miraheze>RikedyP
Miraheze>Adám Brudzewsky
No edit summary
Line 1: Line 1:
{{Primitive|?|Roll}} is a [[monadic]] [[scalar function]] which returns random or pseudo-random numbers. Each [[scalar]] in the argument must be a positive integer, <source lang=apl inline>n</source>, and Roll chooses one of the first <source lang=apl inline>n</source> [[Index|indices]]. Some dialects allow <source lang=apl inline>n</source> to be zero, in which case Roll chooses a floating-point number between 0 and 1.
{{Built-in|Roll|?}} is a [[monadic]] [[scalar function]] which returns random or pseudo-random numbers. The name ''Roll'' comes from the analogy of rolling dice. Each [[scalar]] in the argument must be a positive integer, <source lang=apl inline>n</source>, and Roll chooses one of the first <source lang=apl inline>n</source> [[Index|indices]]. Some dialects allow <source lang=apl inline>n</source> to be zero, in which case Roll chooses a floating-point number between 0 and 1.


== Examples ==
== Examples ==

Navigation menu