newLISP Fan Club

Forum => newLISP newS => Topic started by: John_Small on June 07, 2007, 03:55:26 PM

Title: (for-all cond list1 [... listn])
Post by: John_Small on June 07, 2007, 03:55:26 PM
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)
Title:
Post by: Lutz on June 07, 2007, 04:15:17 PM
isn't 'for-any' what we have in 'exists' (at the moment for just one list)?



Or do you mean:


(or (for-all cnd list1) (for-all cnd list2) ...)

If not can you give a specific example for 'for-any'.



Lutz
Title: You're right exists does what I was asking for in for-any
Post by: John_Small on June 07, 2007, 04:50:11 PM
I didn't see that before.
Title:
Post by: Lutz on June 07, 2007, 05:10:38 PM
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
Title: exists is fine
Post by: John_Small on June 07, 2007, 05:13:35 PM
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.