In Scratch 2.0, support for custom stack blocks (procedures) was added. But is there any way to use this to "abstract away" logic that returns a value?
For example, i have here a script to naively calculate exponents: (view graphic representation)
set [base v] to [2]
set [index v] to [3]
... // above is for initializing
set [result v] to (base)
repeat until <(index) = [1]>
set [result v] to ((result) * (base))
change [index v] by (-1)
How could i export this logic to a "custom reporter" to reuse?