Talk:Align columns: Difference between revisions

→‎J solution: aesthetic improvement
(→‎J solution: aesthetic improvement)
Line 3:
I haven't read the J solution in depth yet, but it appears more complex than may be necessary. For example, with <tt>'LEFT CENTER RIGHT'=:i.3</tt> we can solve the task thus:
 
(#~_2 0{:\ 1": <;._2@:,~&>/'$~';LF;text #)[ (9!:17 CENTER #~ 2 [ 9!:7 ' '$~11) (]":) <;._2@:,~&> /'$';LF;text
Given a text file of many lines, where fields within a line
are delineated by a single 'dollar' character, write a program
Anonymous user