A quick explanation:
The verb (,~,.~)
is what's doing the work here. It's a hook which first stitches ,.
the argument to itself (o
-> oo
) and then appends the original argument to the output:
oo
becomes
oo
o
This verb is repeated 6 times ^:6
with the output of each iteration becoming the input of the next iteration. So
oo
o
becomes
oooo
o o
oo
o
which in turn becomes
oooooooo
o o o o
oo oo
o o
oooo
o o
oo
o
etc. I've then used the oblique adverb on append ,/.
to read the rows diagonally to straighten(ish) the triangle. I didn't need to do this, as randomra points out. I could have just reversed |.
the lot to get the same result. Even better, I could have just used (,,.~)^:6,'o'
to save the reverse step completely.
Ah well, you live and learn. :-)