You can just pass `setcode` a string and it'll execute it and use the output as a fact value.