Re: (funcall #'or my-list)

Liste des GroupesRevenir à cl scheme 
Sujet : Re: (funcall #'or my-list)
De : Nobody447095 (at) *nospam* here-nor-there.org (B. Pym)
Groupes : comp.lang.lisp comp.lang.scheme
Date : 03. Aug 2025, 00:54:56
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <106m8ge$1bd42$1@dont-email.me>
User-Agent : XanaNews/1.18.1.6

Frode Vatvedt Fjeld wrote:

What about (find-if #'identity my-list)?  That seems to work.
Anything better?
 
For an obfuscation contest, I think  (find-if #'null my-list :key
#'not) would do well :) Otherwise, the function "some" is often
used here. I like to define "true" as an alias for the "identity"
function for such uses.
 
Also, loop is often useful:
 
  (loop for x in my-list thereis x)

Gauche Scheme

Using "+" for "identity".

gosh> (any + '(#f #f "DD"))
"DD"
gosh> (any + '(#f #f))
#f

Date Sujet#  Auteur
3 Aug 25 o Re: (funcall #'or my-list)1B. Pym

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal