mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 09:41:36 +00:00
Update raku.html.markdown
This commit is contained in:
parent
9e975a8dcf
commit
8bacbc2d2f
@ -284,8 +284,8 @@ else". You can have as many parameters *before* a slurpy one, but not *after*.
|
|||||||
sub as-many($head, *@rest) {
|
sub as-many($head, *@rest) {
|
||||||
@rest.join(' / ') ~ " !";
|
@rest.join(' / ') ~ " !";
|
||||||
}
|
}
|
||||||
say as-many('Happy', 'Happy', 'Birthday'); # OUTPUT: «Happy / Birthday !»
|
say as-many('Happy', 'Happy', 'Birthday'); # OUTPUT: «Happy / Birthday !»
|
||||||
say 'Happy', ['Happy', 'Birthday'], 'Day'; # OUTPUT: «Happy / Birthday / Day !»
|
say as-many('Happy', ['Happy', 'Birthday'], 'Day'); # OUTPUT: «Happy / Birthday / Day !»
|
||||||
|
|
||||||
# Note that the splat (the *) did not consume the parameter before it.
|
# Note that the splat (the *) did not consume the parameter before it.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user