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.

Source for wiki ContainerSrfiComparison version 1

author

cowan

comment


    

ipnr

74.68.121.27

name

ContainerSrfiComparison

readonly

0

text

This is a face-to-face comparison of three container SRFIs, [http://srfi.schemers.org/srfi-1/srfi-1.html SRFI 1] for lists, [http://srfi.schemers.org/srfi-13/srfi-13.html SRFI 13] for strings, and [http://srfi.schemers.org/srfi-43/srfi-43.html 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:

* zip (SRFI 1)
* association list (SRFI 1)
* set operations on lists (SRFI 1)
* alphabetic case mapping (SRFI 13)
* low-level procedures (SRFI 13)

== 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

time

2012-12-17 15:37:54

version

1