Created
May 17, 2016 16:51
-
-
Save zoffixznet/8965cd3aad133a84ffba5f24db99f354 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
subset IntPair of Pair where { | |
die "Key $_.key() is not an Int" unless val($_.key.Str) ~~ Int; | |
die "Value $_.value() is not an Int" unless .value ~~ Int; | |
True | |
} | |
my @edges of IntPair = | |
1 => 2, | |
3 => 4, | |
6 => 2; | |
sub foo(@e where {.all ~~ IntPair}) { say @e } | |
foo(@edges) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment