is there a "true" function in Common Lisp ?
I mean does there exist a function that returns t for all non nil values of its argument,
and nil if its argument is nil?
There are at least two "false" functions, not and null, which are strictly equivalent, but I was not able
to locate a "true" function. Some context: i want to write an expression that takes a list as its argument,
returns t if there is a non-nil element in the list, and nil otherwise. Here is what I have at the moment.
- Code: Select all
(notevery 'not list)
The not-not looks weird though. With a true function, I could write (some 'true list), which seems cleaner.