Content deleted Content added
Remove dead link |
Add reference to qsort in seqlib.joy |
||
Line 30:
* The '''*''' operator pops two numbers off the stack and pushes their product.
So the square function makes a copy of the top element, and then multiplies the two top elements of the stack, leaving the square of the original top element at the top of the stack, with no need for a formal parameter. This makes Joy concise, as illustrated by this definition of [[quicksort]]:<ref>{{cite web|title=Sequence Library |url=http://www.latrobe.edu.au/phimvt/joy/seqlib.joy |url-status=dead |archive-url=https://web.archive.org/web/20111007030359/http://www.latrobe.edu.au/phimvt/joy/seqlib.joy |archive-date=October 7, 2011 }}</ref>
<pre><nowiki>
Line 37:
[]
[uncons [>] split]
[swapd cons concat]
binrec.
</nowiki></pre>
|