ViIvanov

Untitled

Apr 8th, 2013
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.53 KB | None | 0 0
  1. // bool HasAggregation;
  2. // T argument;
  3. // Predicate<T> check;
  4. // Action<T> visit;
  5.  
  6. // #1
  7. if(!(HasAggregation = HasAggregation || check(argument))) {
  8.   visit(argument);
  9. }//if
  10.  
  11. // #2
  12. if(!HasAggregation && !(HasAggregation = check(argument))) {
  13.   visit(argument);
  14. }//if
  15.  
  16. // #3
  17. if(!HasAggregation) {
  18.   HasAggregation = check(argument);
  19.   if(!HasAggregation) {
  20.     visit(argument);
  21.   }//if
  22. }//if
  23.  
  24. // #4
  25. if(!HasAggregation) {
  26.   if(check(argument)) {
  27.     HasAggregation = true;
  28.   } else {
  29.     visit(argument);
  30.   }//if
  31. }//if
Advertisement
Add Comment
Please, Sign In to add comment