In the case of the function there is just one "**" string definition. That definition is used by Rebol load
function just once, since load
is run just once to translate the code to Rebol internal form - a block. It is true that the assignment occurs twice if you call the function twice, but the assignment does not create anything, it just makes the variable refer to the same string again.
In your comment you should notice that you actually have two "**" string definitions leading to two strings being created by load
. If you use
code: [stars: "**" insert next stars something]
something: "this"
do code
something: "that"
do code
you will notice that there is just one string definition and while you do not have any function the behaviour is the same as it was when a function was used.