The Name Game: Difference between revisions

Content added Content deleted
m (→‎{{header|zkl}}: clean up)
Line 300: Line 300:
{{trans|Kotlin}}
{{trans|Kotlin}}
<lang zkl>fcn printVerse(name){
<lang zkl>fcn printVerse(name){
z,x := name[0].toUpper(), z + name[1,*].toLower();
Z,z,x := name[0].toUpper(), Z.toLower(), Z + name[1,*].toLower();
y:=( if("AEIOU".holds(z)) name.toLower() else x[1,*] );
y:=( if("aeiou".holds(z)) name.toLower() else x[1,*] );
b,f,m := T("B","F","M").apply('wrap(c){ z==c and y or c.toLower()+y });
b,f,m := T("b","f","m").apply('wrap(c){ z==c and y or c+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);