supporting Func<string, T>, closes GH-278