# How to combine multiple rules? [closed]

I have 2 rules:

Rule[#, SomeFunction[#]] &/@ SomeFunctionArgs;
Rule[#, OtherFunction[#]] &/@ OtherFunctionArgs;


I want to have one function that combines the 2 results in 1. I have tried to do:

MainFunction[] =: ( Rule[#, SomeFunction[#]] &/@ SomeFunctionArgs; Rule[#, OtherFunction[#]] &/@ OtherFunctionArgs)


But this didn't work.

SomeFunctionArgs = {
"A",
"B"
}

OtherFunctionArgs = {
"C",
"D"
}


This will give {A -> "result1", B -> "result2"}

Rule[#, SomeFunction[#]] &/@ SomeFunctionArgs


This will give {C -> "result3", D -> "result4"}

Rule[#, OtherFunction[#]] &/@ OtherFunctionArgs


I want MainFunction[] to give the following result:

{A -> "result1", B -> "result2", C -> "result3", D -> "result4"}

## closed as off-topic by Mike Honeychurch, Oleksandr R., Michael E2, Yves Klett, ArtesJan 18 '15 at 15:16

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Mike Honeychurch, Oleksandr R., Michael E2, Yves Klett, Artes
If this question can be reworded to fit the rules in the help center, please edit the question.

• Why not simply use Join? – DavidC Jan 17 '15 at 13:59
• Are you just seeking to apply a function to specific set of arguments as you would using the Map[] function ? Or is your goal something different ? Perhaps some input and output examples might make this more evident. – image_doctor Jan 17 '15 at 14:01
• Please see the update – SuTron Jan 17 '15 at 14:10

Join[

This does the required. I was failing, as I was using ; instead of ,.