keyword?
tests whether the provided forms are keywords
Usage:
(keyword? form+) (!keyword? form+) (is-keyword form)
A form is considered to be a keyword if it is a symbol with a colon (":") prefix. Keywords are often used as unique identifiers and are typically used to access values in objects or define objects keys.
An Example
(keyword? :keyword1 :keyword2 :keyword3)
This example will return #t (true) because each provided form is a keyword.
Like most predicates, this function can also be negated by prepending the !
character. This means that all the provided forms must not be keywords.
(!keyword? "string1" "string2" :keyword1)
This example will return #f (false) because :keyword1
is provided.