Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
19
Task/The-Name-Game/Dyalect/the-name-game.dyalect
Normal file
19
Task/The-Name-Game/Dyalect/the-name-game.dyalect
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
func printVerse(name) {
|
||||
let x = name[..1].Upper() + name[1..].Lower();
|
||||
let y = "AEIOU".IndexOf(x[0]) > -1 ? x.Lower() : x[1..]
|
||||
let b = x[0] is 'B' ? y : "b" + y
|
||||
let f = x[0] is 'F' ? y : "f" + y
|
||||
let m = x[0] is 'M' ? y : "m" + y
|
||||
|
||||
print("\(x), \(x), bo-\(b)")
|
||||
print("Banana-fana fo-\(f)")
|
||||
print("Fee-fi-mo-\(m)")
|
||||
print("\(x)!", x)
|
||||
print()
|
||||
}
|
||||
|
||||
let seq = yields { "Gary", "Earl", "Billy", "Felix", "Mary", "Steve" }
|
||||
|
||||
for x in seq {
|
||||
printVerse(x)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue