Sorting algorithms/Bubble sort: Difference between revisions

Added PicoLisp
(→‎{{header|MATLAB}}: Vectorized the swap operation)
(Added PicoLisp)
Line 1,405:
end bubble_sort;
</lang>
 
=={{header|PicoLisp}}==
<lang PicoLisp>(de bubblesort (Lst)
(let (Len (length Lst) Chg)
(loop
(off Chg)
(map
'((N L)
(when (and (cdr L) (> (car L) (cadr L)))
(xchg L (cdr L))
(on Chg) ) )
(range 1 (dec 'Len))
Lst )
(NIL Chg Lst) ) ) )</lang>
 
=={{header|Pop11}}==
Anonymous user