2,962
edits
m (Text replacement - "<source" to "<syntaxhighlight") |
(Disambiguate use in K and BQN) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
:''For the K and BQN function that creates a one-element list containing its argument, see [[Pair]].'' | |||
{{Built-in|Enlist|∊}} is a [[primitive function]] which returns a [[simple]] [[vector]] of all simple [[scalar]] values in a possibly [[nested array]]. Enlist differs from [[Ravel]] in that Enlist flattens over all layers of nesting, while Ravel flattens only the outermost layer. Enlist shares its [[glyph]] <syntaxhighlight lang=apl inline>∊</syntaxhighlight> with the dyadic function [[Membership]]. | {{Built-in|Enlist|∊}} is a [[primitive function]] which returns a [[simple]] [[vector]] of all simple [[scalar]] values in a possibly [[nested array]]. Enlist differs from [[Ravel]] in that Enlist flattens over all layers of nesting, while Ravel flattens only the outermost layer. Enlist shares its [[glyph]] <syntaxhighlight lang=apl inline>∊</syntaxhighlight> with the dyadic function [[Membership]]. | ||
== Support == | |||
[[APL2]] IUP had <syntaxhighlight lang=apl inline>∊</syntaxhighlight> mean [[Type]]<ref>Graham, Alan. [https://dl.acm.org/doi/pdf/10.1145/22008.22033#page=4 Idioms and Problem Solving Techniques in APL2; Appendix - APL2 Idiom List: 9. Type]. [[APL86]].</ref> and [[Dyalog APL]] originally did too. However, by the time [[IBM]] released APL2, <syntaxhighlight lang=apl inline>∊</syntaxhighlight> (which stood for '''''e''''' in ''prototypical '''e'''lement'') was repurposed for [[Enlist]] (<syntaxhighlight lang=apl inline>∊</syntaxhighlight> being for '''''e''''' in '''''e'''nlist''). Thus, Dyalog left the Type meaning in place only when [[migration level]] is 0, while setting it to 1 (the default) or higher follows IBM's replacement meaning. | |||
== Examples == | == Examples == |