tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
11
Task/Named-parameters/E/named-parameters-1.e
Normal file
11
Task/Named-parameters/E/named-parameters-1.e
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
def printName([=> first := null, => last := null]) {
|
||||
if (last == null) {
|
||||
print("?")
|
||||
} else {
|
||||
print(last)
|
||||
}
|
||||
if (first != null) {
|
||||
print(", ")
|
||||
print(first)
|
||||
}
|
||||
}
|
||||
8
Task/Named-parameters/E/named-parameters-2.e
Normal file
8
Task/Named-parameters/E/named-parameters-2.e
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
? printName(["first" => "John"])
|
||||
?, John
|
||||
|
||||
? printName(["last" => "Doe"])
|
||||
Doe
|
||||
|
||||
? printName(["first" => "John", "last" => "Doe"])
|
||||
Doe, John
|
||||
Loading…
Add table
Add a link
Reference in a new issue