5.1 双 and
Extention:
5.1.1 Naming Rules
Character | Connotation | Elucidation | Example |
resembles | Has the similar function proceeding as it resembling and the output is list(?) accordingly. | ||
general subset | Returns a new list with elements produced from the input list. | ||
serial subset | Returns a new list with elements serially produced from the input list. | ||
broken subset | Returns a new list with removing some elements from the input list. | ||
same as /入 | Implies the type of input data is functions. | ||
product data | Manufactures data and product new one, implies the type of output data is not same as input. | ||
Phrase | - | - | - |
split data to values | Implies the type of output data is values(並). | ||
Punctuation | - | - | - |
strengthen | Strengthen the process, thus the output data may become longer. | ||
soften | Soften the process, thus the output data shorter. | ||
list as input | Implies the type of input data is list. | ||
extend suffix | Suffix of / is an extend explanation of prefix. | ||
Hybrid | - | - | - |
function as input | Implies the type of input data is list. |
5.1.2 双, , , 阴, 阳
Abstractly, we can pair two data together. As a whole, it is called 双. And the first position of it is call 阳, the secondary position is call 阴.
Further more, when we put another 双 to the 阴 position of the former 双, we get a linked data. Likewise, the linked data can be extended as long as you want. By this way, if the 阴 of the ending 双 is empty(空), we call it ; if not, we call it .
双: 又 is a stick figure of "human hand". Two human hand here stand for an object which inludes two holding data.
: The reaching to left bottom 又 means multiple 双 linked together, 㐅 means ending with empty(空).
: Resembles except substituting 㐅 with 又, which means the ending position is not empty(空).
> (双 1 2) '(1 . 2)
> (双 1 (双 2 (双 3 (双 4 空)))) '(1 2 3 4)
> ( 1 2 3 4) '(1 2 3 4)
> (双 1 (双 2 (双 3 4))) '(1 2 3 . 4)
> ( 1 2 3 4) '(1 2 3 . 4)
> ( 1 2 3 '(4)) '(1 2 3 4)
> (阳 '(1 . 2)) 1
> (阴 '(1 . 2)) 2
> (阳 '(1 2 3 4)) 1
> (阴 '(1 2 3 4)) '(2 3 4)
> (阴之阳 '(1 2 3 4)) 2
> (阴之阴阳 '(1 2 3 4)) 3
> (阳 '((1 1.1) 2 3 4)) '(1 1.1)
> (阳之阳 '((1 1.1) 2 3 4)) 1
> (阳之阴阳 '((1 1.1) 2 3 4)) 1.1
5.1.3 、*
为新造字
米:数的简写,见米?;
5.1.4 0、
为新造字
为新造字
弔:原被用于“索引”之意(见弔),但因索引是从零开始的序数,在此借用为“序数”之意;
三:道生一,一生二,二生三,三生万物,故三个相同的一在此为“若干个相同元素”之意;
5.1.5 、
、为新造字
两字分别是仿照、字而造:因为与他们处理数据后输出的结果之数据类型相同(不同在于新造字例程的输入参数之数据类型为);
左上起笔处的偏旁毌,表示“贯穿”之意(毌是贯的古字):因此意思即为把数个贯穿起来组成一个新的并返回之。
> ( 1 2 3 4) '(1 2 3 4)
> ( '(1) '(2) '(3) '(4)) '(1 2 3 4)
> ( '(1) '(2 3 4) '(5 6) '(7)) '(1 2 3 4 5 6 7)
> ( '(a b) 'c) '(a b . c)
> ( '(a b) '(c . d)) '(a b c . d)
> ( '() 'a) 'a
> ( 'a) 'a
> ( 1 2 3 4) '(1 2 3 . 4)
> ( '(1) '(2) '(3) '(4)) '(1 2 3 . 4)
> ( '(1) '(2 3 4) '(5 6) '(7)) '(1 2 3 4 5 6 . 7)
> ( 1 2 3 '(4)) '(1 2 3 4)
> ( '(1) '(2) '(3) '((4))) '(1 2 3 4)
> ( '(1) '(2 22) '(3 33) '((4 44))) '(1 2 22 3 33 4 44)
> ( '(1) '(2 22) '((3 33)) '((4 44))) '(1 2 22 (3 33) 4 44)
> ( '(a b) '(c)) '(a b . c)
> ( '(a b) '((c . d))) '(a b c . d)
> ( '() '(a)) 'a
> ( '(a)) 'a
5.1.6 攸
攸为古活字
攵本意是“用手敲打敦促使其改变”,在此引申为“修改”之意;
另外,也可以认为该字分别取修字左部的偏旁(亻丨)和改字右部偏旁(攵)组成,也即含有“修改”的意思。
5.1.7 甲、乙、丙、丁、戊、己、庚、辛、壬、癸
“甲”、“乙”、“丙”、“丁”、“戊”、“己”、“庚”、“辛”、“壬”、“癸”是中国古代的一种文字记序符号 。
5.1.8 末、
5.1.9 巨
巨为活用字
巨:测量返回长度(本意是“木工用方尺做丈量”(圆是规,方是矩,固有“无规矩不成方圆”之说))。
另见:
> (巨 '(a b c d e 3 f g)) 8
5.1.10 弔,弓、,𰁣、
弔为古活字
弓为活用字
弔:第的简写,像是绳子缠绕在树干表皮上,表示是用某索引提取相对应的值。
弓:引的简写,像是缠绕在树干表皮上的绳子,即“索引”的意思,亦即返回某值的索引;
亻,见:命名规则。
5.1.11 、𨚞,、,分、𨚞分,/入、𨚞/入,于?
、𨚞为新造字
、为新造字
左:从左;
右:从右;
口:右的简写;
阝、刂见:命名规则。
另见:
> ( '(a b c d e f g) 2) '(a b)
> (𨚞 '(a b c d e f g) 2) '(f g)
> ( '(a b c d e f g) 2) '(c d e f g)
> ( '(a b c d e f g) 2) '(a b c d e)
> (分 '(a b c d e f g) 2)
'(a b)
'(c d e f g)
> (𨚞分 '(a b c d e f g) 2)
'(a b c d e)
'(f g)
> (/入 '(8 4 a b 1 c d 2 e f g 3 5 9) 米?) '(8 4)
> (𨚞/入 '(8 4 a b 1 c d 2 e f g 3 5 9) 米?) '(3 5 9)
> (于? '(a b) '(a b c d e f g)) #t
> (于? '(a b z) '(a b c d e f g)) #f
5.1.12 䢼,分,䢼分
䢼、为新造字
共:共同、共有;
阝、刂,见:命名规则。
5.1.13 𰂋,偏,,重、𠝤
𰂋为新造字
偏为活用字
为新造字
𠝤为古活字
间:间以;
扁:扁平;
糸:乱(紊去掉声旁,紊是“乱”的意思(故有成语“有条不紊”));
重:重复之元素;
亻、刂,见:命名规则。
另见:偅
> (𰂋 '(a b c d) '和) '(a 和 b 和 c 和 d)
> (偏 '((a b) (c d) (e f))) '(a b c d e f)
> ( '(a b c d e d c b a)) '(d e c b d a a b c)
> (重 '(a b c d e d c b a)) 'd
> (𠝤 '(a b c d e d c b a)) '(a b c d e)
5.1.14 、𠆯
为新造字
𠆯为古活字
屰:倒序(通逆,甲骨文、金文是“一个倒立的人”);
川:理顺(类比驯、训而得造)。
亻,见:命名规则。
> ( '(21 3 888 666 55 77 1000)) '(1000 77 55 666 888 3 21)
> (𠆯 '(21 3 888 666 55 77 1000) <) '(3 21 55 77 666 888 1000)
> (𠆯 '(21 3 888 666 55 77 1000) >) '(1000 888 666 77 55 21 3)
> (𠆯 '("cat" "dog" "chicken" "duck" "fox") 句<?) '("cat" "chicken" "dog" "duck" "fox")
> (𠆯 '("cat" "dog" "chicken" "duck" "fox") 句>?) '("fox" "duck" "dog" "chicken" "cat")
5.1.15 、、~、^,,,、,~、
> ( 'c '(a b c d e f)) '(c d e f)
> ( 'c '((a b) (c d) (e f))) '(c d)
> (~ 'c '(a b c d e c f)) '(a b d e c f)
> (^ '(c e) '(a b c d e c f)) '(a b d f)
> ( 米? '(a b 1 c d 3 e 9 f)) 1
> ( 米? '(a b 1 c d 3 e 9 f)) '(1 3 9)
> ( 米? '(a b 1 c d 3 e 9 f)) '(1 c d 3 e 9 f)
> ( 米? '((a b) (1 d) (j k) (8 f))) '(1 d)
> ( 米? '(a b 1 c d 3 e 9 f)) '(a b c d e f)
> (~ 米? '(a b 1 c d 3 e 9 f)) '(a b c d 3 e 9 f)
5.1.16 分,巨
5.1.17 各,佫,、,垎、右垎,佫、佫
为便理解,列下代码,两两等同:
> (各 行示 ( 2 4 6 8))
2
4
6
8
> (佫 '(1 2 3 4)) '(2 3 4 5)
> (佫 + '(1 2 3 4) '(100 200 300 400)) '(101 202 303 404)
> ( ? '(1 2 -3 4)) #f
> ( + '(1 2 3 4) '(100 200 300 400)) 404
> ( ? '(1 2 -3 4)) #f
> ( + '(1 2 3 4) '(100 200 300 400)) 101
> (垎 + 0 '(1 2 -3 4)) 4
> (垎 双 '() '(1 2 -3 4)) '(4 -3 2 1)
> (右垎 双 '() '(1 2 -3 4)) '(1 2 -3 4)
> (佫 (入 (x) (并 (? x) ( x))) '(1 3 -4 5)) '(2 4 6)
> (佫 化 '(#(1) #(2 3) #(4))) '(1 2 3 4)
5.1.18 佫之、佫之
> (佫之 char->integer '(#\a #\y #\b #\k #\c #\j #\d)) #\y
> (佫之 char->integer '(#\a #\y #\b #\k #\c #\j #\d)) #\a
> (佫之 阳 '((3 pears) (1 banana) (2 apples))) '(3 pears)
> (佫之 阳 '((3 pears) (1 banana) (2 apples))) '(1 banana)
5.1.19 /组合、/排列组合,/笛卡尔积,/分组
5.1.20 基础例程
(require ming/racket/base) | package: ming |
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
: 弓 + = build-list
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
5.1.21 扩展例程
(require ming/racket/list) | package: ming |
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
攸/入 : 攸 + / + 入 = list-update
汉字化
汉字化
: 弓 + 入 = index-where
汉字化
𰁣 : 亻 + 弓 = indexes-of
汉字化
: 亻 + 弓 + 入 = indexes-where
汉字化
汉字化
𨚞 : 右 + 阝 = take-right
汉字化
汉字化
: 右 + 刂 = drop-right
汉字化
汉字化
𨚞/入 : 𨚞 + / + 入 = takef-right
汉字化
汉字化
/入 : + / + 入 = dropf-right
汉字化
汉字化
𨚞分 : 𨚞 + 分 = split-at-right
汉字化
汉字化
汉字化
于? : 左 + 阝 + 于 + ? = list-prefix?
汉字化
䢼 : 䢼 = take-common-prefix
汉字化
分 : + 分 = drop-common-prefix
汉字化
䢼分 : 䢼 + 分 = split-common-prefix
汉字化
汉字化
𰂋 : 亻 + 间 = add-between
汉字化
汉字化
汉字化
重 : 重 = check-duplicates
汉字化
𠝤 : 重 + 刂 = remove-duplicates
汉字化
: 彐 + 入 + 刂 = filter-not
汉字化
汉字化
汉字化
佫 : 佫 + = filter-map
汉字化
佫 : 佫 + = append-map
汉字化
汉字化
* : + * = inclusive-range
汉字化
/组合 : = combinations
汉字化
/排列组合 : = permutations
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化
汉字化