Well, technically this answers the question, but it doesn't answer /my/ question, since this is the functional-language approach of a loop. Maybe I have to be more specific: the answer you are giving is, to me, what you would code if you were asked to translate, say, the Caml version of mergesort. So the loop is transformed into recursion.

What I wanted to know if there is a way in which loop is translated into rank (if you get what I mean).

Adrien Mathieu

On 05/10/2021 18:53, Gilles Kirouac wrote:
Does this page help?

https://code.jsoftware.com/wiki/NYCJUG/2012-05-08

See Merge-Sort Examples.

~ Gilles

Le 2021-10-05 à 12:03, Adrien Mathieu a écrit :
Hello,

I am a beginner, and I would like to know if there is a way to write mergesort without using loops, or an ugly translation of loops using the ^: conjunction. In particular, I have the impression that the merge part is hard to achieve.

Thanks in advance,

Adrien Mathieu

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
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