The 2026 network upgrade will add OP_DEFINE and OP_INVOKE which allows us to define and invoke reusable functions. We should add a syntax to the CashScript language that allows users to define these "internal" functions and call them inside other contract functions.
This is related to #153. We may want to take some ideas from that issue, such as "libraries" which only contain "internal" functions that can be imported into smart contracts.