Search

( cdddr [ pair? pair ] ) *
The (scheme cxr) library exports twenty-four procedures which are the compositions of from three to four car and cdr operations. For example caddar could be defined by (define caddar (lambda (x) (car (cdr (cdr (car x)))))).
( cddr [ pair? pair ] ) *
caar, cadr, cdar, cddr These procedures are compositions of car and cdr
( cdr [ pair? pair ] ) *
Returns the contents of the cdr field of pair . Note that it is an error to take the cdr of the empty list.
( ceiling [ real? x ] ) real?
floor, ceiling, truncate, round These procedures return integers. The floor procedure returns the largest integer not larger than x. The ceiling procedure returns the smallest integer not smaller than x, truncate returns the integer closest to x whose absolute value is not larger than the absolute value of x, and round returns the closest integer to x, rounding to even when x is halfway between two integers. Rationale: The round procedure rounds to even for consistency with the default rounding mode specified by the IEEE 754 IEEE floating-point standard. Note: If the argument to one of these procedures is inexact, then the result will also be inexact. If an exact value is needed, the result can be passed to the exact procedure. If the argument is infinite or a NaN, then it is returned.
( char->integer [ char? char ] ) integer?
Given a Unicode character, char->integer returns an exact integer between 0 and #xD7FF or between #xE000 and #x10FFFF which is equal to the Unicode scalar value of that character. Given a non-Unicode character, it returns an exact integer greater than #x10FFFF. This is true independent of whether the implementation uses the Unicode representation internally. Given an exact integer that is the value returned by a character when char->integer is applied to it, integer->char returns that character.
( char-alphabetic? [ char? char ] ) boolean?
char-alpabetic?, char-numeric?, char-whitespace? char-upper-case?, char-lower-case? These procedures return #t if their arguments are alphabetic, numeric, whitespace, upper case, or lower case characters, respectively, otherwise they return #f. Specifically, they must return #t when applied to characters with the Unicode properties Alphabetic, Numeric Digit, White Space, Uppercase, and Lowercase respectively, and #f when applied to any other Unicode characters. Note that many Unicode characters are alphabetic but neither upper nor lower case.
( char-ci<=? [ char? char1 ] [ char? char2 ] [ char? char3 ] ... ) boolean?
char-ci=?, char-ci<?, char-ci>?, char-ci<=?, char-ci>=? These procedures are similar to char=? et cetera, but they treat upper case and lower case letters as the same. For example, (char-ci=? #\A #\a) returns #t. Specifically, these procedures behave as if char-foldcase were applied to their arguments before they were compared.
( char-ci<? [ char? char1 ] [ char? char2 ] [ char? char3 ] ... ) boolean?
char-ci=?, char-ci<?, char-ci>?, char-ci<=?, char-ci>=? These procedures are similar to char=? et cetera, but they treat upper case and lower case letters as the same. For example, (char-ci=? #\A #\a) returns #t. Specifically, these procedures behave as if char-foldcase were applied to their arguments before they were compared.
( char-ci=? [ char? char1 ] [ char? char2 ] [ char? char3 ] ... ) boolean?
char-ci=?, char-ci<?, char-ci>?, char-ci<=?, char-ci>=? These procedures are similar to char=? et cetera, but they treat upper case and lower case letters as the same. For example, (char-ci=? #\A #\a) returns #t. Specifically, these procedures behave as if char-foldcase were applied to their arguments before they were compared.
( char-ci>=? [ char? char1 ] [ char? char2 ] [ char? char3 ] ... ) boolean?
char-ci=?, char-ci<?, char-ci>?, char-ci<=?, char-ci>=? These procedures are similar to char=? et cetera, but they treat upper case and lower case letters as the same. For example, (char-ci=? #\A #\a) returns #t. Specifically, these procedures behave as if char-foldcase were applied to their arguments before they were compared.
( char-ci>? [ char? char1 ] [ char? char2 ] [ char? char3 ] ... ) boolean?
char-ci=?, char-ci<?, char-ci>?, char-ci<=?, char-ci>=? These procedures are similar to char=? et cetera, but they treat upper case and lower case letters as the same. For example, (char-ci=? #\A #\a) returns #t. Specifically, these procedures behave as if char-foldcase were applied to their arguments before they were compared.
( char-downcase [ char? char ] ) char?
The char-downcase procedure, given an argument that is the uppercase part of a Unicode casing pair, returns the lowercase member of the pair, provided that both characters are supported by the Scheme implementation. Note that language-sensitive casing pairs are not used. If the argument is not the uppercase member of such a pair, it is returned.
( char-foldcase [ char? char ] ) char?
The char-foldcase procedure applies the Unicode simple case-folding algorithm to its argument and returns the result. Note that language-sensitive folding is not used. If the argument is an uppercase letter, the result will be either a lowercase letter or the same as the argument if the lowercase letter does not exist or is not supported by the implementation. See UAX #29 [11] (part of the Unicode Standard) for details.
( char-lower-case? [ char? char ] ) boolean?
char-alpabetic?, char-numeric?, char-whitespace? char-upper-case?, char-lower-case? These procedures return #t if their arguments are alphabetic, numeric, whitespace, upper case, or lower case characters, respectively, otherwise they return #f. Specifically, they must return #t when applied to characters with the Unicode properties Alphabetic, Numeric Digit, White Space, Uppercase, and Lowercase respectively, and #f when applied to any other Unicode characters. Note that many Unicode characters are alphabetic but neither upper nor lower case.
( char-numeric? [ char? char ] ) boolean?
char-alpabetic?, char-numeric?, char-whitespace? char-upper-case?, char-lower-case? These procedures return #t if their arguments are alphabetic, numeric, whitespace, upper case, or lower case characters, respectively, otherwise they return #f. Specifically, they must return #t when applied to characters with the Unicode properties Alphabetic, Numeric Digit, White Space, Uppercase, and Lowercase respectively, and #f when applied to any other Unicode characters. Note that many Unicode characters are alphabetic but neither upper nor lower case.
( char-ready? ) boolean? ( char-ready? [ input-port? port ] ) boolean?
Returns #t if a character is ready on the textual input port and returns #f otherwise. If char-ready returns #t then the next read-char operation on the given port is guaranteed not to hang. If the port is at end of file then char-ready? returns #t. Rationale: The char-ready? procedure exists to make it possible for a program to accept characters from interactive ports without getting stuck waiting for input. Any input editors associated with such ports must ensure that characters whose existence has been asserted by char-ready? cannot be removed from the input. If char-ready? were to return #f at end of file, a port at end of file would be indistinguishable from an interactive port that has no ready characters.
( char-upcase [ char? char ] ) char?
The char-upcase procedure, given an argument that is the lowercase part of a Unicode casing pair, returns the uppercase member of the pair, provided that both characters are supported by the Scheme implementation. Note that language-sensitive casing pairs are not used. If the argument is not the lowercase member of such a pair, it is returned.
( char-upper-case? [ char? char ] ) boolean?
char-alpabetic?, char-numeric?, char-whitespace? char-upper-case?, char-lower-case? These procedures return #t if their arguments are alphabetic, numeric, whitespace, upper case, or lower case characters, respectively, otherwise they return #f. Specifically, they must return #t when applied to characters with the Unicode properties Alphabetic, Numeric Digit, White Space, Uppercase, and Lowercase respectively, and #f when applied to any other Unicode characters. Note that many Unicode characters are alphabetic but neither upper nor lower case.
( char-whitespace? [ char? char ] ) boolean?
char-alpabetic?, char-numeric?, char-whitespace? char-upper-case?, char-lower-case? These procedures return #t if their arguments are alphabetic, numeric, whitespace, upper case, or lower case characters, respectively, otherwise they return #f. Specifically, they must return #t when applied to characters with the Unicode properties Alphabetic, Numeric Digit, White Space, Uppercase, and Lowercase respectively, and #f when applied to any other Unicode characters. Note that many Unicode characters are alphabetic but neither upper nor lower case.
( char<=? [ char? char1 ] [ char? char2 ] [ char? char3 ] ... ) boolean?
char=?, char<?, char>?, char<=?, char>=? These procedures return #t if the results of passing their arguments to char->integer are respectively equal, monotonically increasing, monotonically decreasing, monotonically non-decreasing, or monotonically non-increasing. These predicates are required to be transitive.