William James
2/13/2016 9:26:00 PM
Kent M. Pitman wrote:
> > but of course #'or is a macro. I wound up writing
> >
> > (some (lambda (e) e) alist)
> >
> > but that seems a bit strained. I've played "guess the word" in the
> > HyperSpec, but can't find the idiom I want.
>
> What's it called in other languages?
He doesn't really want to know. He hopes that there is no such
facility in other languages.
MatzLisp (Ruby):
[nil,2,nil].any?
==>true
[nil,false,nil].any?
==>false
[2,:foo,3].any?{|x| x.is_a? Symbol}
==>true
>
> Lisp has a half dozen ultra trivial ways of saying this, which for as
> often as it seems to come up seems more than adequate.
>
> (loop for x in list thereis x)
>
> (find-if-not #'null x) ;or #'not
>
> (find-if #'identity x)
>
> (some #'identity x)
>
> (eval `(or ,@(mapcar #'(lambda (x) `',x) list)))
--
When there is nothing left on earth but individuals without any roots, sans
racial identity or pride, deprived of any religion, and existing only to be a
consumer, the Jews---who, however, will have kept their own traditions and
identity---will be recognized by all as "God's Chosen People."
--- Herve Ryssen