i've been trying to learn haskell (up to, but not including the m-word!) but i've learned enough to appreciate that haskell can truly represent the quicksort algorithm in a very simple and elegant way.
I tried to translate it to GP using its built-in filter block but i couldn't get it to work, so i wrote my own filter instead.
enjoy!
quicksort in GP
Moderator: MSandro
quicksort in GP
- Attachments
-
- haskell's elegant solution for quicksort
- quicksort.jpg (10.86 KiB) Viewed 35515 times
-
- qsort_try.gpp
- GP program to do quicksort
- (6.36 KiB) Downloaded 1906 times