# SRFI documents inside Racket

# Scheme Requests for Implementation

The "Scheme Requests for Implementation" (SRFI) process is a new approach to helping Scheme users to write portable and yet useful code. It is a forum for people interested in coordinating libraries and other additions to the Scheme language between implementations.

This manual includes the original documentation of all the SRFIs already ported to Racket. For more information on the SRFI process, please follow this link.

## Loading

To load a SRFI with name conflicts (currently SRFIs 1, 5, 13, 17, 19, 43, 45, 48, 61, 63, 69 and 87) in a module,
please see the note below.
To load a SRFI, use the following form:
(require srfi/N)
if you know the number of the SRFI you want to load. This is the preferred method. Alternatively, use this one:
(require srfi/N/NAME)
if you know the `informative name' of the SRFI.
N, is a number corresponding to the sub-collection that holds a particular SRFI, and NAME is a more descriptive name we assigned to the main file in which the SRFI is defined. For instance, to load SRFI-34 you have to do either one of:
(require srfi/34)
or,
(require srfi/34/exception)

NOTE on SRFIs with name conflicts
Certain SRFIs (currently SRFIs 1, 5, 13, 17, 19, 43, 45, 48, 61, 63, 69 and 87) provide names which conflict with names provided by the `racket` language. Attempting to require one of these SRFIs in a module written in the `racket` language will result in an error.
To address this problem, the Racket implementations of these SRFIs provide a different module which renames the problematic exports to avoid these conflicts. For SRFI 1, this library is called list, and should be required like this:
(require srfi/1/list)
which supplies the colliding names with a prefix of 's:' (e.g. "s:map", "s:reverse!") and is therefore suitable for requires in a module.
For SRFI 19, this library is called time, and should be required like this:
(require srfi/19/time)
which supplies the colliding names with a prefix of 'srfi:' (e.g. "srfi:date?", "srfi:date-second") and is therefore
suitable for requires in a module.

Supported SRFIs

SRFI File name Sub-collection
SRFI-1 list.rkt 1
SRFI-2 and-let.rkt 2
SRFI-4(*1) 4.rkt
SRFI-5 let.rkt 5
SRFI-6(+) 6.rkt
SRFI-7 program.rkt 7
SRFI-8 receive.rkt 8
SRFI-9 record.rkt 9
SRFI-11(+) 11.rkt
SRFI-13 string.rkt 13
SRFI-14 char-set.rkt 14
SRFI-16(+) 16.rkt
SRFI-17 set.rkt 17
SRFI-19(*2) time.rkt 19
SRFI-23(+) 23.rkt
SRFI-25 array.rkt 25
SRFI-26 cut.rkt 26
SRFI-27 random-bits.rkt 27
SRFI-28(+) 28.rkt
SRFI-29 localization.rkt 29
SRFI-30(+) 30.rkt
SRFI-31 rec.rkt 31
SRFI-32 sort.scm 32
SRFI-34 exception.rkt 34
SRFI-35 condition.rkt 35
SRFI-38(+) 38.rkt
SRFI-39(+) 39.rkt
SRFI-40 stream.rkt 40
SRFI-42 comprehensions.rkt 42
SRFI-43 vector-lib.rkt 43
SRFI-45(*3) lazy.rkt 45
SRFI-48 format.rkt 48
SRFI-54 cat.rkt 54
SRFI-57 records.rkt 57
SRFI-59 vicinity.rkt 59
SRFI-60 60.rkt 60
SRFI-61 cond.rkt 61
SRFI-62(+)
SRFI-63 63.rkt 63
SRFI-64 testing.rkt 64
SRFI-66 66.rkt 66
SRFI-67 compare.rkt 67
SRFI-69 hash.rkt 69
SRFI-71 letvalues.rkt 71
SRFI-74 74.rkt 74
SRFI-78 check.rkt 78
SRFI-86 86.rkt 86
SRFI-87 case.rkt 87

Notes:

+ Supported by the Racket core
*1 The functionality is all part of racket available via (require ffi/unsafe), the only missing part is the i/o syntax.
*2 The time module does not export its time structure (you have to use the time-* procedures.) It renames all the date-* accessors to tm:date-* so that you won't get errors when including this code in other modules. Care most be taken NOT to confuse the internal date structure with the Racket one, they are not the same, and all procedures from this library expect the former.
*3 This port also provides promise? / srfi-45-promise?.

## Ported SRFIs: original documents

- SRFI 1: List Library
- SRFI 2: AND-LET*: an AND with local bindings, a guarded LET* special form
- SRFI 4: Homogeneous numeric vector datatypes
- SRFI 5: A compatible let form with signatures and rest arguments
- SRFI 6: Basic String Ports
- SRFI 7: Feature-based program configuration language
- SRFI 8: RECEIVE: Binding to multiple values
- SRFI 9: Defining Record Types
- SRFI 11: Syntax for receiving multiple values
- SRFI 13: String Libraries
- SRFI 14: Character-set Library
- SRFI 16: Syntax for procedures of variable arity
- SRFI 17: Generalized set!
- SRFI 19: Time Data Types and Procedures
- SRFI 23: Error reporting mechanism
- SRFI 25: Multi-dimensional Array Primitives
- SRFI 26: Notation for Specializing Parameters without Currying
- SRFI 27: Sources of Random Bits
- SRFI 28: Basic Format Strings
- SRFI 29: Localization
- SRFI 30: Nested Multi-line Comments
- SRFI 31: A special form rec for recursive evaluation
- SRFI 34: Exception Handling for Programs
- SRFI 35: Conditions
- SRFI 38: External Representation for Data With Shared Structure
- SRFI 39: Parameter objects
- SRFI 40: A Library of Streams
- SRFI 42: Eager Comprehensions
- SRFI 43: Vector Library
- SRFI 45: Primitives for Expressing Iterative Lazy Algorithms
- SRFI 48: Intermediate Format Strings
- SRFI 54: Formatting
- SRFI 57: Records
- SRFI 59: Vicinity
- SRFI 60: Integers as Bits
- SRFI 61: A more general cond clause
- SRFI 62: S-expression comments
- SRFI 63: Homogeneous and Heterogeneous Arrays
- SRFI 64: A Scheme API for test suites
- SRFI 66: Octet Vectors
- SRFI 67: Compare Procedures
- SRFI 69: Basic hash tables
- SRFI 71: Extended LET-syntax for multiple values
- SRFI 74: Octet-Addressed Binary Blocks
- SRFI 78: Lightweight testing
- SRFI 86: MU and NU simulating VALUES & CALL-WITH-VALUES, and their related LET-syntax
- SRFI 87: => in case clauses