Page 1 of 1

(for-all cond list1 [... listn])

Posted: Thu Jun 07, 2007 10:55 pm
by John_Small
It would be nice if (for-all ..) allowed for additional,
optional list arguments.

(for-all (fn (item) ...) list1 ... listn)

It may not always be efficient to use append to
concatenate the lists since the for-all may be in
a loop itself.

It would also be nice to have a disjunction complement to
for-all called for-any

(for-any cond list1 ... listn)

Posted: Thu Jun 07, 2007 11:15 pm
by Lutz
isn't 'for-any' what we have in 'exists' (at the moment for just one list)?

Or do you mean:

Code: Select all

(or (for-all cnd list1) (for-all cnd list2) ...)
If not can you give a specific example for 'for-any'.

Lutz

You're right exists does what I was asking for in for-any

Posted: Thu Jun 07, 2007 11:50 pm
by John_Small
I didn't see that before.

Posted: Fri Jun 08, 2007 12:10 am
by Lutz
I remember spending days of pondering if to name this 'exists' or 'for-any'. 'for-any' connects better to 'for-all' but it seems that math/logicians and the Scheme standard R6RS spec prefer 'exists'.

Was do you think?

Lutz

exists is fine

Posted: Fri Jun 08, 2007 12:13 am
by John_Small
my eye sight isn't the greatest any more.

I didn't see the hyperlink to exists in the manual
at the bottom of the example.