Skip to content

Instantly share code, notes, and snippets.

@zoffixznet

zoffixznet/p6.p6 Secret

Created September 5, 2016 21:56
Show Gist options
  • Save zoffixznet/df4d6eff35eb7a6064e58d000b0c9c95 to your computer and use it in GitHub Desktop.
Save zoffixznet/df4d6eff35eb7a6064e58d000b0c9c95 to your computer and use it in GitHub Desktop.
sub calculate-things (Junction $n) {
say "$n is a prime" if $n.is-prime;
say "$n is an even number" if $n %% 2;
say "$n is pretty big" if $n > 1e6;
$n²;
}
my @values = 1, 5, 42, 1e7.Int;
say 'EXACTLY ONE square is larger than 1e10'
if 1e10 < calculate-things @values.one;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment