A nice one is histogram:

   hist =: ~. ,. #/.~
   hist 4 2 5 4 2 6 1 5 2 6 2
4 2
2 4
5 2
6 2
1 1

It's weird to ask for an example of a train since forks are such a
common part of J. If you look at almost any substantial piece of code
you'll be swimming in them in short order.

Marshall

On Wed, Jul 16, 2014 at 01:26:38PM -0700, 'Dan Baronet' via Programming wrote:
> I am looking for good examples of use of trains.
> Apart from the classic +/ % #, I can't think of many more.
> Anyone with some examples? They can be of any length.
> /Dan
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to