The following OZ program uses the built-in partition function in order to perform the QuickSort algorithm. It is required to modify the program by using the original partition schemes instead of the built-in partition function. I searched and found 2 original schemes: Lomuto partition scheme and Hoare partition scheme, but I am not able to modify the program (I am new to OZ language)! The required two partition schemes are explained in Wikipedia in the following link: https://en.wikipedia.org/wiki/Quicksort
The OZ program that I am trying to modify:
declare fun {QuickSort Xs} case Xs of nil then nil [] Pivot|Xr then fun {IsSmaller X} X