There are two ways and you'll need a newer version that contains either invokeBlock or codeMacroBlock. (Maybe v1832, for sure v2012).
First way is using an invokeBlock. As you can see we created a simple function that adds two parameters. In logicBuilder, we added the name on the function and two parameters and returned the same result as if we were to run it in folio/axon.
The second way is using a codeMacroBlock.
It can also be done without creating a variable like below. "foo" variable is define in the codeMacroBlock only and you can see that once the program is saved, it appears in the variables in them right menu. Only thing here is you need some other real variable there.