On Tue, Aug 16, 2011 at 7:28 PM, mijj <[email protected]> wrote:
> i think part of the problem of incoherent one-liners is hard-to-discern
> conceptual grouping.

If you want a multi-line implementation, note that you can choose to
implement top to bottom or bottom to top logic.

multiline=:1 :0
 t=.0 :0-.LF
  if.0=#m do.''1 :t else. (m)=:''1 :t end.
)

enilitlum=:1 :0
  t=. ;|.<;._2]0 :0
  if.0=#m do.''1 :t else. (m)=:''1 :t end.
)

   ''multiline
      +/
      %
      #
)
+/ % #

   ''enilitlum
      #
      %
      +/
)
+/ % #

Personally, I think I prefer the implementation of 'multiline' over
the implementation of 'enilitlum'.

But note that you could also use |.&.;: on each line... (and I do not
think I would like that implementation either, so I am not going to
bother).

-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to