Post History
Ruby, 74 bytes Full program: s=gets+$_.reverse puts [s[0]]+s[1..-2].chars.zip(0..).map{_1+' '*_2+_1}<<s Note that this is not fit for interactive use because it looks weird when you inp...
Answer
#1: Initial revision
# Ruby, 74 bytes Full program: ``` s=gets+$_.reverse puts [s[0]]+s[1..-2].chars.zip(0..).map{_1+' '*_2+_1}<<s ``` Note that this is not fit for interactive use because it looks weird when you input trailing newlines. In bash, try `echo -n Hello | ruby wordsetsquare.rb` ## 75 bytes, Proc ``` ->n{n+=n.reverse;([n[0]]+n[1..-2].chars.zip(0..).map{_1+' '*_2+_1}<<n)*' '} ```