GNU Bash has a magic variable RANDOM that produces random numbers. Assignments to it appear to be ignored.
In Algol, the name of the enclosing function acts as a variable to which you assign in order to produce the return value. For instance, see the assignment to B in the nested function here;