Helper function to extract named elements from a list to match the arguments of supplied function

match_args_to_func(args, func)

Arguments

args

A named list containing arguments to match to `func`

func

A function of whose argumetns to extract