On this page:
筛分*
出去*
右出去*
出去*/  
右出去*/  
8.6

5.2 

 (require ming/list) package: ming

名语言对Racket标准库双和链的扩展。

本页所列之例程的实现代码是名语言,因此源代码有参照意义。

procedure

(筛分* 程A 某链)  链?

  程A : 程?
  某链 : 链?
筛分类似,除返回值不同外。

Example:
> (筛分* 数? '(a bb 22 jj 38 ic))

'((22 38) (a bb jj ic))

procedure

(出去* 某链 数A)  链?

  某链 : 链?
  数A : 数?

procedure

(右出去* 某链 数A)  链?

  某链 : 链?
  数A : 数?

procedure

(出去*/入 某链 数A)  链?

  某链 : 链?
  数A : 数?

procedure

(右出去*/入 某链 数A)  链?

  某链 : 链?
  数A : 数?
依次与出去右出去出去/入右出去/入类似,除返回值不同外。

Examples:
> (出去* '(a b c d e f) 2)

'((a b) (c d e f))

> (右出去* '(a b c d e f) 2)

'((a b c d) (e f))

> (出去*/入 '(a b c d 1 f) 词?)

'((a b c d) (1 f))

> (右出去*/入 '(a b c d 1 f) 词?)

'((a b c d 1) (f))

procedure

( 某链 数A 数B)  链?

  某链 : 链?
  数A : 数?
  数B : 数?
某链的其中一段,从数A处元素算起,到数B止(不包括数B)。

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

'()

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

'()

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

'(a b)