let rec get_patt_args a al = match a with | Ast.PaApp (_, a1, a2) -> get_patt_args a1 (a2 :: al) | _ -> (a, al)