I'd like to collect various functions in a sequence and activate them by the sequence index, like in this simple example:
mul2: func [n] [2 * n]
mul3: func [n] [2 * n]
...
(pick [mul2 mul3] 1) 2 ; yields 2
It seems that mul2 is not treated like a function when it's referred to as a sequence item:
type? (pick [mul2] 1) == word!
Is it possible to arrange functions into sequences?
While experiencing with this example, I noticed that
function? mul2
complains that the argument of mul2 is missing, instead of returning true. Where am I wrong?