The (rnrs base (6)) library exports the procedures and syntactic
forms described in the main section of the Report
(see R6RS Base library). They are
grouped below by the existing manual sections to which they correspond.
See Symbol Primitives, for documentation.
See Characters, for documentation.
See Pairs, for documentation.
See Definition, for documentation.
See Defining Macros, for documentation.
See Local Bindings, for documentation.
See SRFI-11, for documentation.
See Expression Syntax, for documentation.
See Conditionals, for documentation.
See Equality, for documentation.
symbol=?is identical toeq?.
See Complex, for documentation.
See Scientific, for documentation.
See Reals and Rationals, for documentation.
See Exactness, for documentation. The
exactandinexactprocedures are identical to theinexact->exactandexact->inexactprocedures provided by Guile's code library.
See Integer Operations, for documentation.
See Comparison, for documentation.
See List Selection, for documentation.
See Append/Reverse, for documentation.
See Conversion, for documentation.
See String Constructors, for documentation.
See String Selection, for documentation.
See String Comparison, for documentation.
See Mapping Folding and Unfolding, for documentation.
See Arithmetic, for documentation.
These procedures accept two real numbers x and y, where the divisor y must be non-zero.
divreturns the integer q andmodreturns the real number r such that x = q*y + r and 0 <= r < abs(y).div-and-modreturns both q and r, and is more efficient than computing each separately. Note that when y > 0,divreturns floor(x/y), otherwise it returns ceiling(x/y).(div 123 10) ⇒ 12 (mod 123 10) ⇒ 3 (div-and-mod 123 10) ⇒ 12 and 3 (div-and-mod 123 -10) ⇒ -12 and 3 (div-and-mod -123 10) ⇒ -13 and 7 (div-and-mod -123 -10) ⇒ 13 and 7 (div-and-mod -123.2 -63.5) ⇒ 2.0 and 3.8 (div-and-mod 16/3 -10/7) ⇒ -3 and 22/21
These procedures accept two real numbers x and y, where the divisor y must be non-zero.
div0returns the integer q andmod0returns the real number r such that x = q*y + r and -abs(y/2) <= r < abs(y/2).div0-and-mod0returns both q and r, and is more efficient than computing each separately.Note that
div0returns x/y rounded to the nearest integer. When x/y lies exactly half-way between two integers, the tie is broken according to the sign of y. If y > 0, ties are rounded toward positive infinity, otherwise they are rounded toward negative infinity. This is a consequence of the requirement that -abs(y/2) <= r < abs(y/2).(div0 123 10) ⇒ 12 (mod0 123 10) ⇒ 3 (div0-and-mod0 123 10) ⇒ 12 and 3 (div0-and-mod0 123 -10) ⇒ -12 and 3 (div0-and-mod0 -123 10) ⇒ -12 and -3 (div0-and-mod0 -123 -10) ⇒ 12 and -3 (div0-and-mod0 -123.2 -63.5) ⇒ 2.0 and 3.8 (div0-and-mod0 16/3 -10/7) ⇒ -4 and -8/21
These procedures return
#tif and only if their arguments can, respectively, be coerced to a real, rational, or integer value without a loss of numerical precision.
real-valued?will return#tfor complex numbers whose imaginary parts are zero.
nan?returns#tif x is a NaN value,#fotherwise.infinite?returns#tif x is an infinite value,#fotherwise.finite?returns#tif x is neither infinite nor a NaN value, otherwise it returns#f. Every real number satisfies exactly one of these predicates. An exception is raised if x is not real.
Raises an
&assertioncondition if expr evaluates to#f; otherwise evaluates to the value of expr.
These procedures raise compound conditions based on their arguments: If who is not
#f, the condition will include a&whocondition whosewhofield is set to who; a&messagecondition will be included with amessagefield equal to message; an&irritantscondition will be included with itsirritantslist given byirritant1 ....
errorproduces a compound condition with the simple conditions described above, as well as an&errorcondition;assertion-violationproduces one that includes an&assertioncondition.
These procedures implement the
mapandfor-eachcontracts over vectors.
See Vector Creation, for documentation.
See Vector Accessors, for documentation.
See Continuations, for documentation.
See Multiple Values, for documentation.