| Binary Predicate that returns true when either of Boolean arguments x
and y are true.
Note that this functor does not short circuit the evaluation
of the second argument. The reason for this is that, by itself,
this functor accepts only boolean arguments. When it is used in
conjunction with the adaptor functors to implement compound
functors, the adaptor cannot know that the functor it is adapting
may not need to use both arguments, so the adaptor will fully
evaluate both arguments before passing them to the And functor.
This would give the illusion that the short circuit logic is
broken, when it is in fact unimplementable using the standard
functor mechanism.
Copyright © 2002-2005 David A. Hall
author: David A. Hall |