I tried to find information about andmap & ormap operations in chez scheme.
Still, I don't understand the use of these operations, and what is the difference between it and map.
In pseudo-Scheme,
(andmap f xs)  ==  (fold and #t (map f xs))
(ormap  f xs)  ==  (fold or  #f (map f xs))
except that:
and and or in this way.andmap and ormap can short-circuit processing the list.That is, except for slightly different short-circuiting behavior,
(andmap f (list x1 x2 x3 ...))  ==  (and (f x1) (f x2) (f x3) ...)
(ormap  f (list x1 x2 x3 ...))  ==  (or  (f x1) (f x2) (f x3) ...)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With