On Thu, May 14, 2009 at 11:20 AM, Raul Miller <[email protected]> wrote:

> > So if by 'serious' you mean coding in 'pure' style(i.e. no fallback to
> > loop), I am curious to know how can one implement algorithms that needs
> > recursion in J.
>
> For example:
>   1 2 3 + 4
> 5 6 7
>
This is an example that no recursion is needed. The text book example would
be fibonacci number. Even in language like F# which has TCO, it needs to be
twisted a bit to make it 'TCOtable'. Haskell solution is elegant and simple
due to its laziness not that it has TCO.

How would that be implemented in J without recursion and while loop ?
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to