Created
March 27, 2021 01:33
-
-
Save gfldex/96fad87c7bcb1c03c5584c37612aae91 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
use v6.d; | |
multi sub _when(Int $i) { dd $i; } | |
multi sub _when($_ where $_ ~~ /(\w+)/) { say $0 } | |
given 42 { | |
$_.&_when; | |
} | |
given 'word' { | |
$_.&_when; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment