h(x).f().g()
Extension methods are a bit of a hack (although useful!); a cleaner approach is https://en.wikipedia.org/wiki/Uniform_Function_Call_Syntax although I've not personally used a language which supports it :(
https://tour.dlang.org/tour/en/gems/uniform-function-call-sy...