/ http://groups.google.com/groups?hl=en&lr=&threadm=qfBid.3718%24Gm6.1347%40newsread3.news.atl.earthlink.net&prev=/groups%3Fhl%3Den%26lr%3D%26group%3Dcomp.lang.functional lines:{ p:,/s:horizontal[x],vertical x / (s)egments, (p)oints j:&(_.5*#p)#2 / group by pairs i@:&2=#:'i:=(?p)?/:p / where x contacts y k:j i@=h(|/_lin)\:/:h:j i / where x links to y adjust[x]'(+(^x)_vs?,//)'s k} / unpack to lines, adjust verticals vertical:{points[x]'|:'',/segments[("|";-1 0)]'[+x;!#*x]} horizontal:{points[x]',/segments[("-";0 -1)]'[x;!#x]} segments:{:[#b:&(~=)':x[0]=" ",y;z{+(x;y)}'@[-1 2#b;_n;x[1]+];()]} points:{(^x)_sv+y} adjust:{:[(x .*|y)_in"-|";y;@[y;-1+#y;-1 0+]]} a:("----kjsadsfljkasf" "|srdlfhsad---hhfa" "|ssjh---dash|fsas" "saddl|kjsafj|hash" "ask---dhhfsk|fhsf" "sdafhshfsdkjfhshf") lines a