On this page:
list
list?
map
car
cdr
cons
list-ref
length
8.12

1 Perflinty Lists🔗ℹ

 (require perflinty/list) package: rackpgmp

This section describes a list library that warns the user when operations that are asymptotically fast on vectors are being called on instances of a list more often than operations that are asymptotically fast on lists.

syntax

(list v ...)

Like list, but not a procedure? and constructs a separately profiled instance of a Perflinty list.

Note that currently Racket lists and Perflinty lists are incompatible.

list does not affect scores.

procedure

(list? ls?)  boolean?

  ls? : any/c
Like list?, but only returns #t when ls is a Perflinty list?.

list? does not affect scores.

procedure

(map proc? pls)  list?

  proc? : procedure?
  pls : list?
Like map, but for Perflinty lists.

map adds 1 to the list score.

procedure

(car pls)  any/c

  pls : list?
Like car, but for Perflinty lists.

car adds 1 to the list score.

procedure

(cdr pls)  list?

  pls : list?
Like cdr, but for Perflinty lists.

cdr adds 1 to the list score.

procedure

(cons ele pls)  list?

  ele : any/c
  pls : list?
Like cons, but for Perflinty lists.

cons adds 1 to the list score.

procedure

(list-ref pls pos)  any/c

  pls : list?
  pos : exact-nonnegative-integer?
Like list-ref, but for Perflinty lists.

list-ref adds 1 to the vector score.

procedure

(length pls)  exact-nonnegative-integer?

  pls : list?
Like length, but for Perflinty lists.

length adds 1 to the vector score.