How I would describe quicksort in an imperative way:
def sort(list):
pivot is midpoint(list)
left_part is an empty list
right_part is an empty list
for every item in the list
if the item is smaller than the pivot
add(item) to left_part