Recursive Expansion by mitchs

def f i,j,m
m<2?j:[f(i%n=m/2,j-=n,n),~f(j%n,i,n)][j/m]end
puts' '+'_'*~-n=4<<gets.hex,(0...n/=4).map{|i|'|'+(0...n*2).map{|j|'__ '[r=f(i,j,n),1]<<'_||'[r]}*''}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page