MutatingOrNot is registered in the ClimFlows registry. Follow instructions there, then:
] add MutatingOrNotusing MutatingOrNot: void
# one implementation for both styles
f!(y, x) = @. y=x^2
# non-mutating style, AD-compatible
x = randn(10)
y = f!(void, x)
# mutating style, non-allocating and possibly more efficient
f!(y, x)