The Name Game: Difference between revisions
Content added Content deleted
(→{{header|zkl}}: crunch) |
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,z,x := name[0].toUpper(), Z.toLower(), Z + name[1,*].toLower(); |
||
y:=( if(" |
y:=( if("aeiou".holds(z)) name.toLower() else x[1,*] ); |
||
b,f,m := T(" |
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); |