3. 動詞與副詞

第2節 %a 的句子中, % "動作於" a 以產出結果, 因此 %a 等同於英文文法的觀念,動詞作用於名詞或代名詞。此後我們將採用英文法的術語 動詞 替代 (或補充)之前使用的數學術語函數

句子 +/ 1 2 3 4 同於 1+2+3+4; 副詞 / 作用於其動詞引數 + 而產生一個新的動詞,其引數為 1 2 3 4, 而其定義為插入動詞 + 於其引數各項之間。 插入副詞作用於其他引數的意義類似:
   */b=:2 7 1 8 2 8
1792

   <./b
1

   >./b
8
應用副詞產生的新動詞  (如同基本動詞) 也有單邊與雙邊動詞之分。依其作用的結果,副詞 / 可稱為 插入製表。雙邊 / 產生一表格,例如:
   2 3 5 +/ 0 1 2 3 
2 3 4 5
3 4 5 6
5 6 7 8
動詞 over=:({.;}.)@":@, by=:' '&;@,.@[,.] 用來作工具 (拿來用,先不必懂), 幫助瞭解函數表(如前面的加法表)的意義。例如:
   a=: 2 3 5
   b=: 0 1 2 3

   a by b over a +/ b
+-+-------+
| |0 1 2 3|
+-+-------+
|2|2 3 4 5|
|3|3 4 5 6|
|5|5 6 7 8|
+-+-------+
   b by b over b </ b
+-+-------+
| |0 1 2 3|
+-+-------+
|0|0 1 1 1|
|1|0 0 1 1|
|2|0 0 0 1|
|3|0 0 0 0|
+-+-------+

練習

3.1   Enter d=: i.5 and 句子 st=: d-/d and pt=: d^/d to produce 函數表 for subtraction and power.
 
3.2   Make 表格for furr 函數 from 前個 sections, including relations < and = and > and lesser-ofgreater-of.
 
3.3   Apply 動詞 |. and |: to 各類表格, and try to state what y do.
 
3.4   transpose 函數 |: changes subtraction表格, but appears to have no effect on multiplication表格. State property of those 函數 whose 表格remain unchanged when transposed.

解答:y are commutative
 
3.5   Enter d by d over d!/d and state 定義 of dyad ! .

解答: ! is binomial coefficient or outof 函數; 3!5 is number of ways that three things can be chosen from five.


下個前個字彙索引主選單