Zilde: Difference between revisions

Jump to navigation Jump to search
1,026 bytes added ,  14:48, 20 November 2019
m
8 revisions imported: Migrate from miraheze
Miraheze>Marshall
(Created page with "'''Zilde''' is the empty numeric vector. It is the shape of any scalar, although its own shape is <source lang=apl inline>,0</source> (Zilde's shape cannot...")
 
m (8 revisions imported: Migrate from miraheze)
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''Zilde''' is the [[empty]] [[numeric]] [[vector]]. It is the [[shape]] of any [[scalar]], although its own shape is <source lang=apl inline>,0</source> (Zilde's shape cannot be Zilde, as that would mean it were a scalar). Zilde is equivalent to <source lang=apl inline>⍴0</source> or <source lang=apl inline>0⍴0</source>.
{{Built-in|Zilde|⍬}} or '''Zero-tilde''' (which the common name is a portmanteau of), is the [[empty]] [[numeric]] [[vector]]. It is the [[shape]] of any [[scalar]], although its own shape is <source lang=apl inline>,0</source>. This is because, as a vector, it has exactly one [[axis]], and this axis has length 0. Zilde is equivalent to <source lang=apl inline>⍳0</source> and <source lang=apl inline>⍴0</source> and <source lang=apl inline>0⍴0</source>. Being [[numeric]], Zilde's [[prototype]] is 0.


Zilde is notable for being the only APL glyph which represents an array rather than a [[primitive function]] or [[primitive operator]]. In most APLs it is the only array literal which is produced using its own token rather than being part of a family of array literals like [[numeric literals]], [[strings]], or [[system constants]].
Zilde is notable for being an APL [[glyph]] which represents an array rather than a [[primitive function]] or [[primitive operator]]. In most APLs it is the only array literal which is produced using its own token rather than being part of a family of array literals like [[numeric literal]]s, [[string]]s, or [[system constant]]s (an exception is [[SHARP APL]]'s [[nil]] (<source lang=apl inline>∘</source>), which is the same as <source lang=apl inline>⊂⍬</source>).
 
It should be noted that the empty numeric vector (<source lang=apl inline>⍬</source>) is distinct from the empty character vector (<source lang=apl inline>''</source>) even though they have the same shape and the same elements:
<source lang=apl>
      ∧/⍬=''
1
      ⍬≡''
0
</source>
This is because <source lang=apl inline>⍬=''</source> itself returns an empty numeric vector, and reducing an empty vector with the [[Logical And]] function (<source lang=apl inline>∧</source>) yields the [[identity element]] of Logical And, which is 1. However, [[match]] takes [[empty]] array [[prototype]]s into account as well as shapes and elements, so it indicates that the arrays are different.


{{APL built-ins}}
{{APL built-ins}}

Navigation menu