SLIB denotes features by symbols. SLIB maintains a list of features supported by a Scheme session. The set of features provided by a session may change during that session. Some features are properties of the Scheme implementation being used. The following intrinsic features detail what sort of numbers are available from an implementation:
SLIB initialization (in require.scm) tests and provides any of these numeric features which are appropriate.
Other features correspond to the presence of packages of Scheme procedures or syntax (macros).
#t if feature is present in the current Scheme
#f. More specifically,
#t if the symbol feature is the
1, or if feature has been provided by a module
already loaded; and
In some implementations
provided? tests whether a module has
required by any module or in any thread; other
implementations will have
provided? reflect only the modules
required by that particular session or thread.
To work portably in both scenarios, use
provided? only to test
whether intrinsic properties (like those above) are present.
The feature argument can also be an expression calling
not of features. The boolean result
of the logical question asked by feature is returned.
The generalization of
provided? for arbitrary features and catalog
not forms in
expression, using the values returned by calling provided?
on the leaf symbols.
feature-eval returns the boolean result
of the logical combinations.
Informs SLIB that feature is supported in this session.
(provided? 'foo) ⇒ #f (provide 'foo) (provided? 'foo) ⇒ #t
scheme-implementation-type is the name symbol of the running Scheme implementation (RScheme, |STk|, Bigloo, chez, Elk, gambit, gauche, guile, JScheme, kawa, MacScheme, MITScheme, Pocket-Scheme, S7, Scheme48, Scheme->C, Scheme48, Scsh, SISC, T, umb-scheme, or Vscm). Dependence on scheme-implementation-type is almost always the wrong way to do things.