附錄 B. 特殊碼

許多基本單字 contain特殊碼for certain引數 to effect time and/or space savings not available to general引數. Moreover, some片語are "recognized" and are supported by 特殊碼. 例如,雙邊of hook ($,) is exactly reshape of APL (denoted by r); its implementation avoids actually ravelling 右引數, and in so doing saves both time與space:

   ts=: 6!:2 , 7!:2@]
   x=: 11 13 17 19 23
   y=: 29 7 23 11 19$'sesquipedalian'

   (x ($,) y) -: x $, y
1

   ts 'x ($,) y'
0.00773981 2.09818e6
   ts 'x $, y'
0.0170125 3.14662e6
以下列出其他類似的特殊碼
                        
= 雙邊 word-parallel operation on布林引數for following 動詞:
= < <. <: > >. >: +. +: * *. *: ^ ~: | !
<.@f both avoids non-整數 intermediate results on 高精準整數s
>.@f both avoids non-整數 intermediate results on 高精準整數s
+ 雙邊 also * and -;on 視窗, assembly code for 整數引數 for 向量-向量, 向量-scalar,與scalar-向量 cases
^ 雙邊 x^y works by repeated multiplication if x is real and y is integral
m&|@^ 雙邊 avoids exponentiation for高精準引數
m&|@(n&^) 單邊 avoids exponentiation for高精準引數
+/ .* 雙邊 特殊碼
-/ .* 單邊 特殊碼in general;特殊碼for square矩陣s; 特殊碼for 陣列of 2-by-2矩陣s
$, 雙邊 also ($,)"r ;also {, {., }., e., ; avoids ravel
f;.1 both also f;._1 f;.2 f;._2; avoids building引數框格 for several 動詞: < $ , # [ ] {. {: <@}. <@}: ; also <&}. <@:}. etc.
f;.3 both also f;._3; 特殊碼for 矩陣右引數
# 雙邊 特殊碼for布林左引數
# i.@# 單邊 also (# i.&#),etc.; avoids i. on布林引數
#: i.@(*/) 單邊 also (#: i.&(*/)),etc.; 特殊碼for 非負整數 向量
=/ 單邊 also < <: > >: +. +: * *. *: ~:; word-parallel operations on布林引數
+/ 單邊 also * and -;on 視窗, assembly code for 整數引數
,/ 單邊 also ,. ,.&.> ; ; linear time
f/@, 單邊 also f/@:, f/&, f/&:,;avoids ravel
#/. 雙邊 avoids building引數框格
/: both also \:;特殊碼for several data types; 特殊碼for引數with 5 items or less
=/\ 單邊 also +. *. ~:; word-parallel operations on布林引數
+/\ 單邊 also * and -;on 視窗, assembly code for 整數引數
[\ 雙邊 also ]; 特殊碼
2 f/\y 雙邊 also 2 f~/\y;特殊碼for 原子ic f and 向量 y
=/\. 單邊 also < <: > >: +. +: *. *: ~:; word-parallel operations on布林引數
+/\. 單邊 also * and -;on 視窗, assembly code for 整數引數
{ 雙邊 特殊碼for右引數of several data types; 特殊碼for 整數左引數; 特殊碼for 索引ing first two axes
<"1@[ { ] 雙邊 avoids <"1 if左引數is 整數陣列
a=: c}x,y,:z - avoids catenation與lamination; in-place if c is 布林 and a is x or y
y=: x i}y - in-place
f"r both numerous 動詞 have integrated rank support:
= < <. <: > >. >: + +. +: * *. *: - -: % ^ ~: | |. |: $ , ,. ,: # ! [ ] { {. {: }. }: / /: \ \. \: e. i. i: o. p. p:
? 單邊 also ?.;特殊碼if引數is identically 2
? 雙邊 also ?.;特殊碼if左引數is much smaller than右引數
E. 單邊 特殊碼for布林與literal 向量引數
i. 單邊 also i:;special case for length-1引數
i. 雙邊 also e. and i:;特殊碼for several data types; 特殊碼for i.!.0; 特殊碼for引數with 許多identical columns


下個前個字彙索引主選單