Roll: Difference between revisions

Jump to navigation Jump to search
75 bytes added ,  07:00, 9 July 2020
no edit summary
No edit summary
Line 1: Line 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.
{{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. Roll shares its [[glyph]] with the other random-result function, [[Deal]].


== Examples ==
== Examples ==

Navigation menu