Advertisement
Guest User

Function "one" may not be called without arguments

a guest
May 29th, 2017
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 6 0.18 KB | None | 0 0
  1. use v6;
  2.  
  3. enum MyEnum <one, two, three>;
  4.  
  5. my $a = 3;
  6.  
  7. given $a {
  8.     when (one.value+1) {say "one"}
  9.     when (two.value+1) {say "two"}
  10.     when (three.value+1) {say "three"}
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement