The Name Game: Difference between revisions
Content added Content deleted
m (→{{header|zkl}}: typeo) |
(→{{header|zkl}}: crunch) |
||
Line 300: | Line 300: | ||
{{trans|Kotlin}} |
{{trans|Kotlin}} |
||
<lang zkl>fcn printVerse(name){ |
<lang zkl>fcn printVerse(name){ |
||
x:=name[0].toUpper() + name[1,*].toLower(); |
z,x := name[0].toUpper(), z + name[1,*].toLower(); |
||
y:=( if("AEIOU".holds( |
y:=( if("AEIOU".holds(z)) name.toLower() else x[1,*] ); |
||
b,f,m := " |
b,f,m := T("B","F","M").apply('wrap(c){ z==c and y or c.toLower()+y }); |
||
switch(x[0]){ |
|||
case("B"){ b=y } |
|||
case("F"){ f=y } |
|||
case("M"){ m=y } |
|||
} |
|||
println("%s, %s, bo-%s".fmt(x,x,b)); |
println("%s, %s, bo-%s".fmt(x,x,b)); |
||
println("Banana-fana fo-",f); |
println("Banana-fana fo-",f); |