mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-24 10:01:38 +00:00
Fix #2040
This commit is contained in:
parent
b2133b532b
commit
e31dc8b5a7
@ -103,7 +103,7 @@ sub say-hello-to(Str $name) { # You can provide the type of an argument
|
||||
|
||||
## It can also have optional arguments:
|
||||
sub with-optional($arg?) { # the "?" marks the argument optional
|
||||
say "I might return `(Any)` (Perl's "null"-like value) if I don't have
|
||||
say "I might return `(Any)` (Perl's 'null'-like value) if I don't have
|
||||
an argument passed, or I'll return my argument";
|
||||
$arg;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user