Skip to content

Instantly share code, notes, and snippets.

@zoffixznet
Created September 5, 2016 21:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zoffixznet/1b860cd78ebf1406e142f5c2a3d8df97 to your computer and use it in GitHub Desktop.
Save zoffixznet/1b860cd78ebf1406e142f5c2a3d8df97 to your computer and use it in GitHub Desktop.
sub calculate-things ($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 'a square of a value if larger than 1e10'
if 1e10 < calculate-things @values.any;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment