Word Set Square
+1
−0
Challenge
Given a string, e.g. Hello
, do the following:
Mirror it:
Hello -> HelloolleH
and create a right triangle using it as the sides:
H
ee
l l
l l
o o
o o
l l
l l
e e
HelloolleH
Which looks sort of like a set square.
That's it!
Scoring
This is code-golf. Shortest answer in each language wins.
2 answers
+1
−0
V (vim), 23 bytes
æw|PòlÄxòjVLkîyllv$r $Ð
Hexdump:
00000000: e677 7c50 f26c c478 f26a 564c 6bee 796c .w|P.l.x.jVLk.yl
00000010: 6c76 2472 2024 d0 lv$r $.
0 comments
+1
−0
Haskell, 110 bytes
f a=s>>=(#)$a++reverse a
[email protected](a:b)!f=f c:b!f
_!_=[]
f#n=n!((n!).f)
s(p:q)(d:e)(b:c)|e==c||e==[]=b|q==c=d|0<1=' '
0 comments