There actually is another way, though I would prefer the solution of @SillyFreak. If you define your function in a variable as an unnamed function, you can still access the original function inside:
#let query = target => {
let quarry = // assume something interesting is done
query(quarry)
}
Also, for completeness, starting with (the soon to be released) version 0.12, you will no longer need to store the original function yourself, as it will be available under the std
namespace as std.query
.