We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sub f($a is raw = 42){ my $b is default('answer'); $b = True; $b = $a; say $b }; f Nil; # rakudo-moar d6cd0d2f5: OUTPUT: «answer»
The text was updated successfully, but these errors were encountered:
We have some of it:
https://docs.perl6.org/type/Nil#index-entry-Nil_assignment
Sorry, something went wrong.
f Nil does not activate the default 42 value. Passing nothing does:
f Nil
sub f($a is raw = 42 ){ my $b is default('answer'); $b = $a; say $b }; f; # OUTPUT: «42»
$a will take a Nil value even if it's not declared as raw:
$a
sub f($a){ my $b is default('answer'); say $a; $b = $a; say $b }; f Nil; # OUTPUT: «Nilanswer»
I'll see how this can be explained better, maybe in Signatures.
5fcaa5e
No branches or pull requests
The text was updated successfully, but these errors were encountered: