SRFI-88 Keyword Objects
SRFI-88 provides keyword objects, which are equivalent to Guile’s keywords (see Keywords). SRFI-88 keywords can be entered using the postfix keyword syntax, which consists of an identifier followed by : (see postfix keyword syntax). SRFI-88 can be made available with:
emacs-lisp
(use-modules (srfi srfi-88))Doing so installs the right reader option for keyword syntax, using (read-set! keywords 'postfix). It also provides the procedures described below.
Scheme Procedure: keyword? obj
Return #t if obj is a keyword. This is the same procedure as the same-named built-in procedure (see keyword?).
emacs-lisp
(keyword? foo:) ⇒ #t
(keyword? 'foo:) ⇒ #t
(keyword? "foo") ⇒ #fScheme Procedure: keyword->string kw
Return the name of kw as a string, i.e., without the trailing colon. The returned string may not be modified, e.g., with string-set!.
emacs-lisp
(keyword->string foo:) ⇒ "foo"Scheme Procedure: string->keyword str
Return the keyword object whose name is str.
emacs-lisp
(keyword->string (string->keyword "a b c")) ⇒ "a b c"