This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home. For a version of this page that may be more recent, see ContainerSrfiComparison in WG2's repo for R7RS-large.

Container­Srfi­Comparison

cowan
2012-12-17 23:31:16
2history
source

This is a face-to-face comparison of three container SRFIs, SRFI 1 for lists, SRFI 13 for strings, and SRFI 43 for vectors. It will eventually mature into a proposal to make them match up to some degree, as has been done in R7RS-small, but at the moment it's just data. Procedures present in the small language have mostly been removed unless they have corresponding procedures in other SRFIs that aren't part of the small language, as I assume that they won't be separately part of the large language.

The following sections are omitted here because they aren't likely to have counterparts in other containers:

Constructors

xcons

-

-

cons*

-

-

list-tabulate

string-tabulate

-

circular-list

-

-

iota

-

-

-

-

vector-reverse-copy

Predicates

null?

string-null?

vector-empty?

proper-list?

-

-

circular-list?

-

-

dotted-list?

-

-

not-pair?

-

-

null-list?

-

-

list=

-

vector=

Selectors

first .. tenth

-

-

car+cdr

-

-

take(!)

string-take

-

drop

string-drop

-

take-right(!)

string-take-right

-

drop-right

string-drop-right

-

split-at(!)

-

-

last

-

-

last-pair

-

-

-

string-padâ€

-

-

string-pad-rightâ€

-

-

string-trimâ€

-

-

string-trim-rightâ€

-

-

string-trim-bothâ€

-

Comparisons

-

string(-ci)-<>

-

-

string-compare(-ci)

-

-

string-hash(-ci)

-

Prefixes and suffixes

-

string-prefix(-ci)?

-

-

string-suffix(-ci)?

-

-

string-prefix-length(-ci)

-

-

string-suffix-length(-ci)

-

Length

length+

-

-

Append

append!

-

-

Concatenate

concatenate(!)

string-concatenate

vector-concatenate

-

string-join

-

-

string-concatenate-reverse

-

Reverse

reverse(!)

string-reverse(!)

vector-reverse!

append-reverse(!)

-

-

-

-

vector-swap!

-

-

reverse-list->string

-

-

reverse-vector->list

-

-

reverse-list->vector

-

Count

count

string-countâ€

vector-count

-

string-contains(-ci)

-

Fold, unfold & map

fold

string-fold

vector-fold

-

string-fold-right

vector-fold-right

unfold

string-unfold

vector-unfold

-

string-unfold-right

vector-unfold-right

pair-fold

-

-

reduce

-

-

fold-right

-

-

unfold-right

-

-

pair-fold-right

-

-

reduce-right

-

-

append-map(!)

-

-

map(!)

string-map(!)

vector-map(!)

pair-for-each

-

-

filter-map

-

-

map-in-order

-

-

-

string-for-each-index

-

Replicate & rotate

-

xsubstring

-

-

string-xcopy!

-

Filtering & partitioning

filter(!)

string-filterâ€

-

partition(!)

-

-

remove(!)

string-deleteâ€

-

Searching

find

-

-

find-tail

-

-

any

string-anyâ€

vector-any

every

string-everyâ€

vector-every

list-index

string-indexâ€

vector-index

-

string-index-rightâ€

vector-index-right

-

string-skipâ€

vector-skip

-

string-skip-rightâ€

vector-skip-right

take-while(!)

-

-

drop-while

-

-

span(!)

-

-

break(!)

-

-

-

-

vector-binary-search

Deleting

delete(!)

string-deleteâ€

-

delete-duplicates(!)

-

-

String oddities

substring/shared, string-concatenate/shared, string-append/shared, string-concatenate-reverse/shared, string-replace, string-tokenize

†Polymorphic procedure: accepts character, character set, or predicate