|
|
|
|
|
by junke
3592 days ago
|
|
You can name your symbol as you want in Lisp, "(make-symbol s)" works for all string "s". With the reader, if you need to define symbols with spaces or otherwise not treated as symbols, or if you want to ensure the names are not upcased (it depends on the readtable), you enclose the name in bars: |anything, whatever| is a single symbol, as well as || (the empty symbol). The convention for predicates is to use "-p" (there is a hyphen if the rest of the symbol has hyphens, otherwise no hyphen).
I think I saw a few libraries that define "thing?" predicates, but that is quite rare. People generally tend to not break conventions in practice, even though "?" can be regarded as a logical prefix for predicates. |
|