Optimization of an univariate function using Optim.jl

What about

res2 = optimize(f ∘ only, [0.])  # ?