How can this rule
a -> {1, 2, 3}
be transformed into this
{a -> 1, a -> 2, a -> 3}
by way of a function?
Answers 3175 and 10524 only address extracting values from the right-hand side, so (as far as I can tell) this question is distinct.
a -> b is just an alternate notation for Rule[a,b], so you can extract a using First, Part, Extract, etc. See here: http://reference.wolfram.com/language/tutorial/PartsOfExpressions.html
– Szabolcs
Nov 14 '14 at 20:29
Thread to it. If you have x = a -> {1,2,3} then you can just use Thread[x], no need to know what's inside x, other than that it's a rule with a list on the RHS. Can you give an example input and a corresponding example output? I thought a -> {1, 2, 3} and {a -> 1, a -> 2, a -> 3} could be considered such. Thread takes you from one to the other.
– Szabolcs
Nov 14 '14 at 20:35
x -> y could be expressed as Rule[x,y], and therefore be used with Thread.
– higgy
Nov 14 '14 at 21:17