Maybe use `typeof(f(r.front))`, which avoids introducing a function (which has its own problems), then wrap it in a local template for `staticMap` and such.