On this page:
filter-multiple
extend
map/  values
map2

14 Lists

NOTE: This library is deprecated; use racket/list, instead. The contents of this module, with the exceptions below, have been merged with racket/list.

 (require unstable/list) package: unstable-list-lib

The subsequent bindings were added by Sam Tobin-Hochstadt.

procedure

(filter-multiple l f ...)  
list? ...
  l : list?
  f : procedure?
Produces (values (filter f l) ...).

Example:
> (filter-multiple (list 1 2 3 4 5) even? odd?)

'(2 4)

'(1 3 5)

procedure

(extend l1 l2 v)  list?

  l1 : list?
  l2 : list?
  v : any/c
Extends l2 to be as long as l1 by adding (- (length l1) (length l2)) copies of v to the end of l2.

Example:
> (extend '(1 2 3) '(a) 'b)

'(a b b)

The subsequent bindings were added by Carl Eastlund.

procedure

(map/values n f lst ...)  
(listof B_1) ... (listof B_n)
  n : natural-number/c
  f : (-> A ... (values B_1 ... B_n))
  lst : (listof A)

NOTE: This library is deprecated; use for/lists, instead.

Produces lists of the respective values of f applied to the elements in lst ... sequentially.

Example:
> (map/values
   3
   (lambda (x)
     (values (+ x 1) x (- x 1)))
   (list 1 2 3))

'(2 3 4)

'(1 2 3)

'(0 1 2)

procedure

(map2 f lst ...)  
(listof B) (listof C)
  f : (-> A ... (values B C))
  lst : (listof A)

NOTE: This library is deprecated; use for/lists, instead.

Produces a pair of lists of the respective values of f applied to the elements in lst ... sequentially.

Example:
> (map2 (lambda (x) (values (+ x 1) (- x 1))) (list 1 2 3))

'(2 3 4)

'(0 1 2)