Advertisement
cwchen

[Perl 6] logic operators

Sep 30th, 2017
679
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 6 0.45 KB | None | 0 0
  1. (True && True) == True or die "Wrong logic";
  2. (True && False) == False or die "Wrong logic";
  3. (False && True) == False or die "Wrong logic";
  4. (False && False) == False or die "Wrong logic";
  5.  
  6. (True || True) == True or die "Wrong logic";
  7. (True || False) == True or die "Wrong logic";
  8. (False || True) == True or die "Wrong logic";
  9. (False || False) == False or die "Wrong logic";
  10.  
  11. (!True) == False or die "Wrong logic";
  12. (!False) == True or die "Wrong logic";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement