I'm creating an implementation of a Lindenmayer system (L-system) in the Clojure programming language and I'm trying to figure out a name for a utility function which takes a number of arguments and then, using uniform distribution, chooses one of them. I'd like to appeal to non-mathematical/non-statistical readers by using a succinct function name which does not stray too far from the average person's vocabulary (soft goal, I know). Right now I've settled for "one-of", but I wonder if there is a more correct and easily understood term I could use.
By the way, if anyone wants to see the code in context, it is here: https://github.com/Reefersleep/l-mayer/blob/master/src/l_mayer/core.clj
The function implementation looks like this:
(defn one-of [& args] (let [random (rand-int (count args))] (get args random)))
And can be used like this:
(one-of :a :b :c)
In this usage, it would return either
:c, with a 33,3% chance of each.