On this page:
伄^
􏾝
􏾘
􏾘^
􏺊
􏹃
􏹊
仔?
􏼓
􏿳
􏿳?
􏺈
􏺇
8.12

4.2 􏿴🔗

 (require ming/list) package: ming
Extend 双 and 􏿴.

All the procedures in this page are implemented in Ming, thus the source code can be seen as a demonstation of it.

procedure

( LST N ...)  􏿴?

  LST : 􏿴?
  N : 􏺡?

procedure

(伄^ LST N-LST)  􏿴?

  LST : 􏿴?
  N-LST : (listof 􏺡?)
Composed of , , ^.

Examples:
> ( '(a b c d e f g) 0 2 3)

'(a c d)

> (伄^ '(a b c d e f g) '(0 2 3))

'(a c d)

procedure

(􏾝 LST N1 N2)  􏿴?

  LST : 􏿴?
  N1 : 􏺡?
  N2 : 􏺡?
Composed of , .

Examples:
> (􏾝 '(a b c d e f) 0 0)

'()

> (􏾝 '(a b c d e f) 0 1)

'(a)

> (􏾝 '(a b c d e f) 1 2)

'(b)

> (􏾝 '(a b c d e f) 0 2)

'(a b)

> (􏾝 '(a b c d e f) 0 5)

'(a b c d e)

> (􏾝 '(a b c d e f) 2 5)

'(c d e)

> (􏾝 '(a b c d e f) 2)

'(c d e f)

procedure

(􏾘 LST N)  􏿴?

  LST : 􏿴?
  N : 􏺡?

procedure

(􏾘^ LST N-LST)  􏿴?

  LST : 􏿴?
  N-LST : (listof? 􏺡?)
Composed of , , ^.

🐘 􏾺 𨚞

Examples:
> (􏾘 '(a b c d e f g) 1)

'(a c d e f g)

> (􏾘^ '(a b c d e f g) '(0 1 3))

'(c e f g)

procedure

(􏺊 LST N M)  􏿴?

  LST : 􏿴?
  N : 􏺡?
  M : 􏺡?
Shorts for (􏷴 (􏷵 LST N) M).

Example:
> (􏺊 '(a b c d e f g) 1 3)

'(b c d)

procedure

(􏹃 LST PROC)  􏺡?

  LST : 􏿴?
  PROC : 程?
Composed of , .

🐘 􏹈巨

Example:
> (􏹃 '(a b 12 c 33 d  58 f g) 米?)

3

procedure

( LST)  􏿴?

  LST : 􏿴?
Composed of , .

Examples:
> ( '())

'()

> ( '(11))

'()

> ( '(11 22 33 22 44))

'(22)

> ( '(11 11 11 22 55 22 33 88 88 88 99 99))

'(11 22 88 99)

procedure

(􏹊 V LST [PROC])  􏿴?

  V : any/c
  LST : 􏿴?
  PROC : 程? = 同?
Composed of , .

🐘 􏹊~ 􏹊^

Example:
> (􏹊 'c '(a b c d e c f))

'(a b d e f)

procedure

(仔? LST1 LST2)  boolean?

  LST1 : 􏿴?
  LST2 : 􏿴?
LST1是否是LST2的子集。

为活用字

Examples:
> (仔? '(a b) '(a b c d e f g))

#t

> (仔? '(a e) '(a b c d e f g))

#t

> (仔? '(a z) '(a b c d e f g))

#f

procedure

(􏼓 V N ...)  􏿴?

  V : any?
  N : 􏺡?
Composed of , 􏿴. Same as 􏼓0 except the reverse order of arguments.

Example:
> (􏼓 'val 8)

'(val val val val val val val val)

procedure

(􏿳 V ...)  􏿳?

  V : any?
Composed of , 􏿴. Means generate association list.

🐘 􏿰

Examples:
> (􏿳 1 2 3 4 1 5)

'((1 . 2) (3 . 4) (1 . 5))

> (􏿳)

'()

> (􏿳 1)

'()

> (􏿳 1 2 3)

'((1 . 2))

procedure

(􏿳? V)  boolean?

  V : any?
If V is 􏿳 or not. Same as ( (􏿴? V) (􏷮 双? V)).

Examples:
> (􏿳? '(1 2 3 4))

#f

> (􏿳? (􏿳 1 2 3 4))

#t

> (􏿳? '((1 . 2) (3 . 4)))

#t

> (􏿳? '((1 2) (3 4)))

#t

> (􏿳? '((1 (2)) (3 (4))))

#t

procedure

(􏺈 ALST)  􏿴?

  ALST : 􏿳?

procedure

(􏺇 ALST)  􏿴?

  ALST : 􏿳?
Same as:

Examples:
> (􏺈 '((1 . 2) (3 . 4)))

'(1 3)

> (􏺇 '((1 . 2) (3 . 4)))

'(2 4)