Generates the AST to sort maps per sort specs (ascending/descending keys)
Generates a sort function from sort specs allowing to sort maps