For a detailed description of that, please have a look here: Mojo Closures 2026
In your case, you can pass the function as a parameter (rather than an argument):
def oper[f: def(Int, Int) thin -> Int](val_1: Int, val_2: Int) -> Int:
return f(val_1, val_2)
One hint: on the Mojo Discord, there is an AI bot channel where you can find answers to such questions quite quickly.