Quicksort script

Hi,

I need help to write a script quicksort on mikrotik. Sample contents of the array:

:local tab [ :toarray "1,4,1,23" ];