In a previous post I defined function as an action that is supposed to occur within a process, in order to move that process along. I wrote another post where I used an example to explain how functions work in a magical process, namely as actions that lead to or connect with other actions that move the process along. Now we're going to explore how to rewrite a function in a magical process. When a process of magic doesn't work the way you expected it to, then you need to examine the functions of that process and likely rewrite them. A function is really the description of the action and how it ought to work. It is your understand of that action and how it executes a principle of magic in order to fulfill the process. Thus what you are rewriting or changing with the function is your understanding of that action and how it ought to work.
It's important to recognize the distinction of rewriting a function based on description as opposed to action. The action performed may change as a result of how we change the description, but we are changing the description so that we understand how the action works and can accordingly perform it to realize the process. When a process doesn't work, its usually because the magician doesn't fully understand what is happening. That lack of understanding allows for variables in your magical process that can change what happens. In a sense, what understanding does is define the path of possibility and lock it in, so understanding is not only important in terms of knowing why actions occur and how magical principles inform those actions, but it is also important in terms of locking out unneeded variables and possibilities.
When you rewrite a function, you first examine it in terms of what ought to happen and ask why the action didn't happen the way it ought to have. What you'll likely discover is that the function doesn't connect to the next function in a way that is understandable. We humans need to know how something connects in order to fully accept that it will connect. And this mean that the connection needs to be logical or rational. It could be irrational, but it needs to make sense and if it doesn't make sense what that demonstrates is a lack of understanding of what the function is supposed to do and how what occurs fits in with everything else happening in your magical process.
Once you discover what the issue is, you need to rewrite the function. This involves changing what occurs when the function is executed so that it connects to other functions and makes sense to you when doing so. What this reveals to us is just how important it is for a given magical process to make sense to us. If it doesn't fully make sense, some part of us will reject it and that is what will truly sabotage the magical working. This isn't a matter of psychology, as much as it is a matter of comprehension. The way we comprehend the world and our own actions necessarily informs the magical work we do. To neglect that or assume it doesn't matter is to reject a crucial element of the magical work: Ourselves and how we execute the magical work through the functions we perform and our understanding of those functions. I don't think this aspect of magic is discussed enough or if it is, its fashionably written off as being psychological, but I'd argue it's not psychological. It is a recognition that the magician is at the core of the magical process, and that his/her understanding of that process and the functions of the process is a key part of what makes the magical process work. S/he may understand the process and functions in different ways, spiritual, psychological, informational, etc., but however you categorize the understanding what matters is that s/he can can connect the process to the result in a manner that makes sense and enables him/her to execute the process and manifest the magic into change that transforms reality.