Added some examples to the tutorial.
This commit is contained in:
parent
88ff27148b
commit
eefbdec53a
@ -40,6 +40,11 @@ rule "say both %first and also %second":
|
|||||||
say %first
|
say %first
|
||||||
say %second
|
say %second
|
||||||
|
|
||||||
|
rule "get x from %dict":
|
||||||
|
#.. Functions can return values explicitly, but if not, the last line in the function
|
||||||
|
is the return value.
|
||||||
|
return (%dict's "x")
|
||||||
|
|
||||||
#.. Function calls can have parts of the function's name spread throughout.
|
#.. Function calls can have parts of the function's name spread throughout.
|
||||||
Everything that's not a literal value is treated as part of the function's name
|
Everything that's not a literal value is treated as part of the function's name
|
||||||
say both "Hello" and also "again!"
|
say both "Hello" and also "again!"
|
||||||
|
Loading…
Reference in New Issue
Block a user