I am a Common Lisp newbie who's beginning to learn the language. My question is: I've seen several functions use the predicate syntax in different ways. For example (just looked this up), there is streamp and pathnamep, but there is also input-stream-p and output-stream-p. Why aren't all functions standardized to use *p or *-p? Is this maybe just a historical artifact?
The rule is that one-word predicate names end in just P
, while multi-word predicate names end in -P
. The reason for the former is mostly historical; the reason for the latter is that a name like input-streamp
would wrongly suggest that the question being asked is “is this input a stream?” or something like that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With