Created
May 17, 2016 16:41
Star
You must be signed in to star a gist
IntPair Subset
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 IntPair @edges = | |
| 1 => 2, | |
| 3 => 4, | |
| 6 => 2; | |
| sub foo(IntPair @e) { say @e } | |
| foo(@edges) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Solved! Thanks @zoffixznet!