New answers tagged

1

MATLAB, 111 bytes Try it online function J(s) s=[' ' s];s=replace(s,{'\/','\ /'},'\ /');for k=find(s=='o') o(k-2:k+2)='_/ \_';end char(s,o)


1

J, 37 bytes 'ni >\1 <d+[o*e-!]'{~_4(3#.~.i.])\] Try it online!


1

Zsh, 118 bytes 0="n i > \1${(l:11:)}<d + [o * e-!]" for s (`tr \ £|fold -4`)(eval ';n+=$s[(i)$s['{2..4}]];printf $0[5#$n-30]) Try it online! 0="n i > \1${(l:11:)}<d + [o * e-!]" - store this string in the variable $0. ${(l:11:)} generates 11 spaces (literally, left-padding an empty string to a length of 11), ...


1

sed, 227 bytes s/^.o*/<&>/ :a s/>z\(.o*\)/><\1>/ ta :b s/z>/0>/g y/z/-/ s/oooooooooo/x/g s/ooooooooo/m9/g s/oooooooo/m8/g s/ooooooo/m7/g s/oooooo/m6/g s/ooooo/m5/g s/oooo/m4/g s/ooo/m3/g s/oo/m2/g s/o/m1/g s/x\([^xm]\)/x0\1/g s/m//g y/x/o/ tb Try it online! Usage 0 and 1 for input are replaced with z and o respectively. Input is ...


1

Jelly, 15 bytes Ż¬<\œp$ḊLCṛ¡ḢƊ€ Try it online! Although it's something of an improvement over the previous solution, this feels clumsy. (Though not as clumsy now that it doesn't use k.) Input as a list of zeroes and ones. Ż Prepend a leading zero to the input. ¬ Flip 0 <-> 1. œp$ Split that around ...


Top 50 recent answers are included