def function_maker(func):
    """Wraps a function to return [params, f(params)]"""
    def f(params):
        try:
            r = func(**params)
        except Exception as e:
            r = e
        return [params, r]
    return f