Next: , Up: libutils names   [Index]


7.1.1 Library name predicates

The following bindings are exported by the library (vicare libraries).

Function: library-name? sexp

Return #t if sexp is a symbolic expressions compliant with the definition of ?library-name according to R6RS.

(library-name? '())                             ⇒ #f
(library-name? '(alpha))                        ⇒ #t
(library-name? '(alpha beta))                   ⇒ #t
(library-name? '(alpha beta gamma))             ⇒ #t
(library-name? '(alpha beta gamma ()))          ⇒ #t
(library-name? '(alpha beta gamma (1)))         ⇒ #t
(library-name? '(alpha beta gamma (1 2 3)))     ⇒ #t
(library-name? '(alpha 123 gamma))              ⇒ #f
(library-name? '(alpha beta gamma (1 ciao)))    ⇒ #f
Function: library-version-numbers? obj

Return #t if obj is a list of library version numbers according to R6RS, this includes obj being null.

(library-version-numbers? '(1))         ⇒ #t
(library-version-numbers? '(1 2 3))     ⇒ #t
(library-version-numbers? '(1 -2 3))    ⇒ #f
(library-version-numbers? '(1 A 3))     ⇒ #f

NOTE According to R6RS: obj should be an exact integer, which means a finxum or bignum for Vicare. This predicate accepts only fixnums because they are faster to handle and “big enough”.

Function: library-version-number? obj

Return #t if obj is a single version number according to R6RS.