On this page:
list-prefix?
filter-multiple
extend

5 Lists

 (require unstable/list)

(list-prefix? l r)  boolean?
  l : list?
  r : list?
True if l is a prefix of r.

Example:

  > (list-prefix? '(1 2) '(1 2 3 4 5))

  #t

The subsequent bindings were added by Sam Tobin-Hochstadt.

(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)

(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.

Examples:

(extend ’(1 2 3) ’(a) ’b)