On Mon, Mar 28, 2011 at 7:00 AM, Adrian May <[email protected]> wrote: > (I'm thinking in terms of recursion cos that's what I'd do in Haskell: I'd > define an infinite list starting from i, which is i followed by the infinite > list starting from inc(i), then I'd lazily take the first few elements.)
In my opinion, J's power comes from its abilities to to use "primitive recursive" functions instead of "total recursive" functions. For generality purposes, J does not forbid total recursion, but it's frequently a bad match to the problem. Also, J's design means that total recursive approaches frequently tend to not be particularly efficient, when compared with the alternatives. So, anyways, it's probably a good idea to avoid thinking in terms of lazy lists when programming in J. -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
