I found arithmetic_function/1 but it is deprecated. If arithmetic_expression_value/2 is supposed to accomplish the same thing, I don’t understand how. Is there a way to create custom arithmetic expression functions that isn’t deprecated? If not, I’d like to use arithmetic_function/1 but I’m not sure how to use it. Do I just create a predicate with an extra argument for the return value and declare it in arithmetic_function/1 as a directive?

I’d also like to define functions that can take list arguments but I’ve seen some discussion suggesting that this was never possible. Any ideas?