Fix the order in which arguments are read in the (list) primitive.
Implement checking of function arity and variadic functions.