2,951
edits
(Created page with "{{Built-in|Range|…}}, also called '''Sequence''' in NARS2000 using the digraph <source lang=apl inline>..</source>, is a dyadic primitive function which creates...") |
(Disambiguate) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{Built- | :''This page is about the dyadic primitive function. "Range" refers to [[Unique]] in K and [[Index Generator]] in BQN.'' | ||
{{Built-ins|Range|…|..}} or '''Sequence''' is a [[dyadic]] [[primitive function]] which creates a [[vector]] of consecutive integers based on the start and end values given by its [[argument|arguments]]. It serves as an [[index origin]]-agnostic alternative to [[Index Generator]] for creating a range of numbers. Range is currently implemented in [[NARS2000]] (using the digraph <source lang=apl inline>..</source>), [[Extended Dyalog APL]], and [[dzaima/APL]]. | |||
== Basic usage == | == Basic usage == | ||
Line 14: | Line 16: | ||
</source>{{Works in|[[NARS2000]], [[Extended Dyalog APL]], [[dzaima/APL]]}} | </source>{{Works in|[[NARS2000]], [[Extended Dyalog APL]], [[dzaima/APL]]}} | ||
It should be noted that, since the exact definition of Range has never been standardised, a different implementation might as well choose to return <source lang=apl inline>⍬</source> or even throw [[DOMAIN ERROR]] for <source lang=apl inline>X…Y</source> when <source lang=apl inline>X>Y</source>. | It should be noted that, since the exact definition of Range has never been standardised, a different implementation might as well choose to return <source lang=apl inline>⍬</source> or even throw a [[DOMAIN ERROR]] for <source lang=apl inline>X…Y</source> when <source lang=apl inline>X>Y</source>. | ||
== Extensions == | == Extensions == |