infer fn return type