(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 13.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 43360, 1192] NotebookOptionsPosition[ 38817, 1077] NotebookOutlinePosition[ 40577, 1129] CellTagsIndexPosition[ 40534, 1126] WindowTitle->AssociatePairs | Example Notebook WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell[TextData[{ "Basic Examples", "\[NonBreakingSpace]", Cell["(2)", "ExampleCount"], "\[NonBreakingSpace]" }], "Subsection", TaggingRules->{}, CellID->285421464], Cell[TextData[{ "Make an ", Cell[BoxData[ TagBox[ ButtonBox[ StyleBox["Association", "SymbolsRefLink", ShowStringCharacters->True, FontFamily->"Source Sans Pro"], BaseStyle->Dynamic[ FEPrivate`If[ CurrentValue["MouseOver"], { "Link", FontColor -> RGBColor[0.8549, 0.39608, 0.1451]}, {"Link"}]], ButtonData->"paclet:ref/Association", ContentPadding->False], MouseAppearanceTag["LinkHand"]]], "InlineFormula", FontFamily->"Source Sans Pro"], ":" }], "Text", TaggingRules->{}, CellChangeTimes->{{3.751718037041629*^9, 3.751718061751026*^9}, { 3.759522025385147*^9, 3.759522026005912*^9}, {3.8535081570194674`*^9, 3.853508159265626*^9}}, CellID->221583938], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ DynamicModuleBox[{Typeset`open = False}, FrameBox[ PaneSelectorBox[{False->GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["AssociatePairs", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"], ImageSizeCache->{11., {1., 10.}}], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"], ImageSizeCache->{11., {1., 10.}}]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}], True-> GridBox[{ {GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["AssociatePairs", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"]], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"]]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}]}, { StyleBox[ PaneBox[GridBox[{ { RowBox[{ TagBox["\<\"Version (latest): \"\>", "IconizedLabel"], " ", TagBox["\<\"1.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/AssociatePairs"}, "HyperlinkURL"], "IconizedItem"]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{5, 4}, {0, 4}}], "DialogStyle", FontFamily->"Roboto", FontSize->11]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{None}}, "Rows" -> {False, { GrayLevel[0.8]}, False}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}]}, Dynamic[ Typeset`open], BaselinePosition->Baseline, ImageSize->Automatic], Background->RGBColor[ 0.9686274509803922, 0.9764705882352941, 0.984313725490196], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 0}}, FrameStyle->RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627], RoundingRadius->4]], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "AssociatePairs"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["AssociatePairs"], BoxID -> "AssociatePairs", Selectable->False], "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"a", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"b", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"c", ",", "3"}], "}"}]}], "}"}], "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.7512033909897842`*^9, 3.7512034190938253`*^9}}, CellLabel->"In[18]:=", CellID->289653060], Cell[BoxData[ RowBox[{"\[LeftAssociation]", RowBox[{ RowBox[{"a", "\[Rule]", "1"}], ",", RowBox[{"b", "\[Rule]", "2"}], ",", RowBox[{"c", "\[Rule]", "3"}]}], "\[RightAssociation]"}]], "Output", TaggingRules->{}, CellChangeTimes->{{3.7512034128484507`*^9, 3.751203419547201*^9}, 3.7540540043696127`*^9}, CellLabel->"Out[18]=", CellID->1315059597] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ InterpretationBox[Cell["\t", "ExampleDelimiter"], $Line = 0; Null]], "ExampleDelimiter", TaggingRules->{}, CellID->1054739420], Cell[TextData[{ "Make an ", Cell[BoxData[ TagBox[ ButtonBox[ StyleBox["Association", "SymbolsRefLink", ShowStringCharacters->True, FontFamily->"Source Sans Pro"], BaseStyle->Dynamic[ FEPrivate`If[ CurrentValue["MouseOver"], { "Link", FontColor -> RGBColor[0.8549, 0.39608, 0.1451]}, {"Link"}]], ButtonData->"paclet:ref/Association", ContentPadding->False], MouseAppearanceTag["LinkHand"]]], "InlineFormula", FontFamily->"Source Sans Pro"], " from two lists:" }], "Text", TaggingRules->{}, CellChangeTimes->{{3.751717171383216*^9, 3.7517171767609873`*^9}, { 3.7517172342481403`*^9, 3.751717238273377*^9}, {3.75171805212411*^9, 3.75171805257262*^9}, {3.759522031580695*^9, 3.759522031913704*^9}, { 3.853508162579294*^9, 3.853508165264085*^9}}, CellID->441417833], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ DynamicModuleBox[{Typeset`open = False}, FrameBox[ PaneSelectorBox[{False->GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["AssociatePairs", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"], ImageSizeCache->{11., {1., 10.}}], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"], ImageSizeCache->{11., {1., 10.}}]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}], True-> GridBox[{ {GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["AssociatePairs", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"]], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"]]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}]}, { StyleBox[ PaneBox[GridBox[{ { RowBox[{ TagBox["\<\"Version (latest): \"\>", "IconizedLabel"], " ", TagBox["\<\"1.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/AssociatePairs"}, "HyperlinkURL"], "IconizedItem"]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{5, 4}, {0, 4}}], "DialogStyle", FontFamily->"Roboto", FontSize->11]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{None}}, "Rows" -> {False, { GrayLevel[0.8]}, False}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}]}, Dynamic[ Typeset`open], BaselinePosition->Baseline, ImageSize->Automatic], Background->RGBColor[ 0.9686274509803922, 0.9764705882352941, 0.984313725490196], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 0}}, FrameStyle->RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627], RoundingRadius->4]], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "AssociatePairs"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["AssociatePairs"], BoxID -> "AssociatePairs", Selectable->False], "[", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"a", ",", "b", ",", "c"}], "}"}], ",", RowBox[{"Range", "[", "3", "]"}]}], "}"}], "]"}], "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.75122591172244*^9, 3.751225932402441*^9}, { 3.751716912274108*^9, 3.751716922830474*^9}, {3.7517169642757673`*^9, 3.751716973402969*^9}, {3.751717027529722*^9, 3.751717062217413*^9}, { 3.751717097556674*^9, 3.7517171121803703`*^9}, {3.751718182355629*^9, 3.751718194544965*^9}}, CellLabel->"In[19]:=", CellID->731722798], Cell[BoxData[ RowBox[{"\[LeftAssociation]", RowBox[{ RowBox[{"a", "\[Rule]", "1"}], ",", RowBox[{"b", "\[Rule]", "2"}], ",", RowBox[{"c", "\[Rule]", "3"}]}], "\[RightAssociation]"}]], "Output", TaggingRules->{}, CellChangeTimes->{ 3.75171692330553*^9, {3.751716968053829*^9, 3.7517169737770576`*^9}, { 3.751717027952795*^9, 3.751717062634077*^9}, 3.751717107986092*^9, 3.751718194856739*^9, 3.754054006620329*^9}, CellLabel->"Out[19]=", CellID->1066989171] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ "Applications", "\[NonBreakingSpace]", Cell["(1)", "ExampleCount"], "\[NonBreakingSpace]" }], "Subsection", TaggingRules->{}, CellID->20767984], Cell["The number of moons for each planet in the solar system:", "Text", TaggingRules->{}, CellChangeTimes->{{3.7512854542477694`*^9, 3.751285488679448*^9}}, CellID->1450344774], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ DynamicModuleBox[{Typeset`open = False}, FrameBox[ PaneSelectorBox[{False->GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["AssociatePairs", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"], ImageSizeCache->{11., {1., 10.}}], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"], ImageSizeCache->{11., {1., 10.}}]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}], True-> GridBox[{ {GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["AssociatePairs", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"]], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"]]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}]}, { StyleBox[ PaneBox[GridBox[{ { RowBox[{ TagBox["\<\"Version (latest): \"\>", "IconizedLabel"], " ", TagBox["\<\"1.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/AssociatePairs"}, "HyperlinkURL"], "IconizedItem"]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{5, 4}, {0, 4}}], "DialogStyle", FontFamily->"Roboto", FontSize->11]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{None}}, "Rows" -> {False, { GrayLevel[0.8]}, False}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}]}, Dynamic[ Typeset`open], BaselinePosition->Baseline, ImageSize->Automatic], Background->RGBColor[ 0.9686274509803922, 0.9764705882352941, 0.984313725490196], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 0}}, FrameStyle->RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627], RoundingRadius->4]], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "AssociatePairs"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["AssociatePairs"], BoxID -> "AssociatePairs", Selectable->False], "[", RowBox[{ RowBox[{ RowBox[{"PlanetData", "[", RowBox[{"#", ",", RowBox[{"{", RowBox[{"\"\\"", ",", "\"\\""}], "}"}]}], "]"}], "&"}], "/@", RowBox[{"PlanetData", "[", "]"}]}], "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.751283655801507*^9, 3.751283662165577*^9}}, CellLabel->"In[143]:=", CellID->612023245], Cell[BoxData[ RowBox[{"\[LeftAssociation]", RowBox[{ RowBox[{"\<\"Mercury\"\>", "\[Rule]", "0"}], ",", RowBox[{"\<\"Venus\"\>", "\[Rule]", "0"}], ",", RowBox[{"\<\"Earth\"\>", "\[Rule]", "1"}], ",", RowBox[{"\<\"Mars\"\>", "\[Rule]", "2"}], ",", RowBox[{"\<\"Jupiter\"\>", "\[Rule]", "69"}], ",", RowBox[{"\<\"Saturn\"\>", "\[Rule]", "62"}], ",", RowBox[{"\<\"Uranus\"\>", "\[Rule]", "27"}], ",", RowBox[{"\<\"Neptune\"\>", "\[Rule]", "14"}]}], "\[RightAssociation]"}]], "Output", TaggingRules->{}, CellChangeTimes->{3.7512836692074947`*^9}, CellLabel->"Out[143]=", CellID->1010780199] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ "Properties and Relations", "\[NonBreakingSpace]", Cell["(1)", "ExampleCount"], "\[NonBreakingSpace]" }], "Subsection", TaggingRules->{}, CellID->461307998], Cell[TextData[{ "Equivalent ways to get an ", Cell[BoxData[ TagBox[ ButtonBox[ StyleBox["Association", "SymbolsRefLink", ShowStringCharacters->True, FontFamily->"Source Sans Pro"], BaseStyle->Dynamic[ FEPrivate`If[ CurrentValue["MouseOver"], { "Link", FontColor -> RGBColor[0.8549, 0.39608, 0.1451]}, {"Link"}]], ButtonData->"paclet:ref/Association", ContentPadding->False], MouseAppearanceTag["LinkHand"]]], "InlineFormula", FontFamily->"Source Sans Pro"], ":" }], "Text", TaggingRules->{}, CellChangeTimes->{{3.751215983488019*^9, 3.7512160020044193`*^9}, { 3.75128129732476*^9, 3.751281299717103*^9}, {3.751715006283823*^9, 3.751715012088173*^9}, {3.7517150693581257`*^9, 3.751715074442068*^9}, { 3.751718568585238*^9, 3.75171857025991*^9}, {3.751718701615588*^9, 3.751718701992042*^9}, {3.751718775156146*^9, 3.751718784323122*^9}, { 3.751718822726532*^9, 3.751718826856916*^9}, {3.759522041127304*^9, 3.759522041408537*^9}, {3.8535081821465187`*^9, 3.8535081840681067`*^9}}, CellID->1299093221], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Association", "@@", RowBox[{"Rule", "@@@", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\"\<1st\>\"", ",", "\"\\""}], "}"}], ",", RowBox[{"{", RowBox[{"\"\<2nd\>\"", ",", "\"\\""}], "}"}], ",", RowBox[{"{", RowBox[{"\"\<3rd\>\"", ",", "\"\\""}], "}"}]}], "}"}]}]}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.7512037163301353`*^9, 3.751203748402851*^9}, { 3.751715042210087*^9, 3.751715061809876*^9}, {3.7517177966239147`*^9, 3.751717797262532*^9}}, CellID->1806677606], Cell[BoxData[ RowBox[{"\[LeftAssociation]", RowBox[{ RowBox[{"\<\"1st\"\>", "\[Rule]", "\<\"John\"\>"}], ",", RowBox[{"\<\"2nd\"\>", "\[Rule]", "\<\"Bill\"\>"}], ",", RowBox[{"\<\"3rd\"\>", "\[Rule]", "\<\"Joe\"\>"}]}], "\[RightAssociation]"}]], "Output", TaggingRules->{}, CellChangeTimes->{{3.751203719369091*^9, 3.751203749108884*^9}, 3.7517150624063387`*^9}, CellLabel->"Out[44]=", CellID->291836944] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Association", "[", RowBox[{"Thread", "[", RowBox[{ RowBox[{"{", RowBox[{"\"\<1st\>\"", ",", "\"\<2nd\>\"", ",", "\"\<3rd\>\""}], "}"}], "->", RowBox[{"{", RowBox[{"\"\\"", ",", "\"\\"", ",", "\"\\""}], "}"}]}], "]"}], "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.75122591172244*^9, 3.751225932402441*^9}}, CellLabel->"In[82]:=", CellID->1917676007], Cell[BoxData[ RowBox[{"\[LeftAssociation]", RowBox[{ RowBox[{"\<\"1st\"\>", "\[Rule]", "\<\"John\"\>"}], ",", RowBox[{"\<\"2nd\"\>", "\[Rule]", "\<\"Bill\"\>"}], ",", RowBox[{"\<\"3rd\"\>", "\[Rule]", "\<\"Joe\"\>"}]}], "\[RightAssociation]"}]], "Output", TaggingRules->{}, CellChangeTimes->{{3.751225921708027*^9, 3.751225932842173*^9}}, CellLabel->"Out[82]=", CellID->1623574039] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ "Possible Issues", "\[NonBreakingSpace]", Cell["(1)", "ExampleCount"], "\[NonBreakingSpace]" }], "Subsection", TaggingRules->{}, CellID->95944414], Cell[TextData[{ Cell[BoxData[ StyleBox["AssociatePairs", "InlineResourceFunction"]], "InlineFormula", FontFamily->"Source Sans Pro"], " does not thread over lists:" }], "Text", TaggingRules->{}, CellChangeTimes->{{3.7512812466944427`*^9, 3.751281261166172*^9}, 3.759522049714519*^9, 3.853508188345408*^9}, CellID->56862166], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ InterpretationBox[ TagBox[ DynamicModuleBox[{Typeset`open = False}, FrameBox[ PaneSelectorBox[{False->GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["AssociatePairs", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"], ImageSizeCache->{11., {1., 10.}}], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"], ImageSizeCache->{11., {1., 10.}}]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}], True-> GridBox[{ {GridBox[{ { PaneBox[GridBox[{ { StyleBox[ StyleBox[ AdjustmentBox["\<\"[\[FilledSmallSquare]]\"\>", BoxBaselineShift->-0.25, BoxMargins->{{0, 0}, {-1, -1}}], "ResourceFunctionIcon", FontColor->RGBColor[ 0.8745098039215686, 0.2784313725490196, 0.03137254901960784]], ShowStringCharacters->False, FontFamily->"Source Sans Pro Black", FontSize->0.6538461538461539 Inherited, FontWeight->"Heavy", PrivateFontOptions->{"OperatorSubstitution"->False}], StyleBox[ RowBox[{ StyleBox["AssociatePairs", "ResourceFunctionLabel"], " "}], ShowAutoStyles->False, ShowStringCharacters->False, FontSize->Rational[12, 13] Inherited, FontColor->GrayLevel[0.1]]} }, GridBoxSpacings->{"Columns" -> {{0.25}}}], Alignment->Left, BaseStyle->{LineSpacing -> {0, 0}, LineBreakWithin -> False}, BaselinePosition->Baseline, FrameMargins->{{3, 0}, {0, 0}}], ItemBox[ PaneBox[ TogglerBox[Dynamic[Typeset`open], {True-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeCloser"]], False-> DynamicBox[FEPrivate`FrontEndResource[ "FEBitmaps", "IconizeOpener"]]}, Appearance->None, BaselinePosition->Baseline, ContentPadding->False, FrameMargins->0], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{1, 1}, {0, 0}}], Frame->{{ RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627, 0.5], False}, {False, False}}]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, GridBoxSpacings->{"Columns" -> {{0}}, "Rows" -> {{0}}}]}, { StyleBox[ PaneBox[GridBox[{ { RowBox[{ TagBox["\<\"Version (latest): \"\>", "IconizedLabel"], " ", TagBox["\<\"1.0.0\"\>", "IconizedItem"]}]}, { TagBox[ TemplateBox[{ "\"Documentation \[RightGuillemet]\"", "https://resources.wolframcloud.com/FunctionRepository/\ resources/AssociatePairs"}, "HyperlinkURL"], "IconizedItem"]} }, DefaultBaseStyle->"Column", GridBoxAlignment->{"Columns" -> {{Left}}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], Alignment->Left, BaselinePosition->Baseline, FrameMargins->{{5, 4}, {0, 4}}], "DialogStyle", FontFamily->"Roboto", FontSize->11]} }, BaselinePosition->{1, 1}, GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}}, GridBoxDividers->{"Columns" -> {{None}}, "Rows" -> {False, { GrayLevel[0.8]}, False}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}]}, Dynamic[ Typeset`open], BaselinePosition->Baseline, ImageSize->Automatic], Background->RGBColor[ 0.9686274509803922, 0.9764705882352941, 0.984313725490196], BaselinePosition->Baseline, DefaultBaseStyle->{}, FrameMargins->{{0, 0}, {1, 0}}, FrameStyle->RGBColor[ 0.8313725490196079, 0.8470588235294118, 0.8509803921568627], RoundingRadius->4]], {"FunctionResourceBox", RGBColor[0.8745098039215686, 0.2784313725490196, 0.03137254901960784], "AssociatePairs"}, TagBoxNote->"FunctionResourceBox"], ResourceFunction["AssociatePairs"], BoxID -> "AssociatePairs", Selectable->False], "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"r", ",", "s"}], "}"}], ",", RowBox[{"{", RowBox[{"t", ",", "u"}], "}"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"w", ",", "x"}], "}"}], ",", RowBox[{"{", RowBox[{"y", ",", "z"}], "}"}]}], "}"}]}], "}"}], "]"}]], "Input", TaggingRules->{}, CellChangeTimes->{{3.751226079113014*^9, 3.7512260915811453`*^9}, { 3.751281983971986*^9, 3.751282005585359*^9}, 3.751718474366555*^9}, CellLabel->"In[59]:=", CellID->2085159666], Cell[BoxData[ RowBox[{"\[LeftAssociation]", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"r", ",", "s"}], "}"}], "\[Rule]", RowBox[{"{", RowBox[{"t", ",", "u"}], "}"}]}], ",", RowBox[{ RowBox[{"{", RowBox[{"w", ",", "x"}], "}"}], "\[Rule]", RowBox[{"{", RowBox[{"y", ",", "z"}], "}"}]}]}], "\[RightAssociation]"}]], "Output", TaggingRules->{}, CellChangeTimes->{3.751226092126317*^9, 3.75128200685182*^9, 3.751718482155755*^9}, CellLabel->"Out[59]=", CellID->403571048] }, Open ]] }, Closed]] }, ClosingSaveDialog->False, WindowSize->Automatic, WindowMargins->Automatic, WindowTitle->"AssociatePairs | Example Notebook", Visible->False, FrontEndVersion->"13.0 for Mac OS X x86 (64-bit) (December 9, 2021)", StyleDefinitions->Notebook[{ Cell[ StyleData[ StyleDefinitions -> FrontEnd`FileName[{"Wolfram"}, "Reference.nb", CharacterEncoding -> "UTF-8"]]], Cell[ StyleData[All, "Working"], Editable -> True, DockedCells -> {}], Cell[ StyleData["Notebook"], Editable -> True, DockedCells -> {}, ScrollingOptions -> {"VerticalScrollRange" -> Automatic}], Cell[ StyleData[ "Section", StyleDefinitions -> StyleData["PrimaryExamplesSection"]], Editable -> True, ShowGroupOpener -> "Inline", WholeCellGroupOpener -> True], Cell[ StyleData["Subsection", StyleDefinitions -> StyleData["ExampleSection"]], Editable -> True, ShowGroupOpener -> "Inline", WholeCellGroupOpener -> True], Cell[ StyleData[ "Subsubsection", StyleDefinitions -> StyleData["ExampleSubsection"]], Editable -> True, ShowGroupOpener -> "Inline", WholeCellGroupOpener -> True], Cell[ StyleData[ "Subsubsubsection", StyleDefinitions -> StyleData["ExampleSubsubsection"]], Editable -> True, ShowGroupOpener -> "Inline", WholeCellGroupOpener -> True], Cell[ StyleData["Text", StyleDefinitions -> StyleData["ExampleText"]], Editable -> True]}, Visible -> False, FrontEndVersion -> "13.0 for Mac OS X x86 (64-bit) (December 9, 2021)", StyleDefinitions -> "PrivateStylesheetFormatting.nb"] ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[627, 23, 168, 7, 70, "Subsection",ExpressionUUID->"283c3c8d-f32e-41bb-a060-a21b506b8709", CellID->285421464], Cell[798, 32, 719, 22, 70, "Text",ExpressionUUID->"9e1a62f1-93b9-4291-8536-7280f14f50a9", CellID->221583938], Cell[CellGroupData[{ Cell[1542, 58, 7373, 188, 70, "Input",ExpressionUUID->"707f54ab-ee3b-42a9-beb0-4d37f83f945e", CellID->289653060], Cell[8918, 248, 368, 10, 70, "Output",ExpressionUUID->"99f369af-861b-4dc4-9319-ae52c398b97f", CellID->1315059597] }, Open ]], Cell[CellGroupData[{ Cell[9323, 263, 145, 4, 70, "ExampleDelimiter",ExpressionUUID->"38a96059-223b-4501-8b74-bd22c743806f", CellID->1054739420], Cell[9471, 269, 829, 23, 70, "Text",ExpressionUUID->"a3ecade5-6a58-4785-82ac-41b36be167f0", CellID->441417833], Cell[CellGroupData[{ Cell[10325, 296, 7587, 190, 70, "Input",ExpressionUUID->"bd85b68c-236b-4c0c-b699-472c81a8abf5", CellID->731722798], Cell[17915, 488, 484, 12, 70, "Output",ExpressionUUID->"44bf325c-ab3e-4359-99fd-9ca71c103d26", CellID->1066989171] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[18460, 507, 165, 7, 70, "Subsection",ExpressionUUID->"fbe42694-69f8-4f82-86bf-e38b3f7c05b7", CellID->20767984], Cell[18628, 516, 180, 3, 70, "Text",ExpressionUUID->"c292661b-57eb-4638-8af1-8fe7ac968254", CellID->1450344774], Cell[CellGroupData[{ Cell[18833, 523, 7388, 188, 70, "Input",ExpressionUUID->"9263d154-3053-445c-9a82-6ee92232dc9f", CellID->612023245], Cell[26224, 713, 627, 15, 70, "Output",ExpressionUUID->"f2745a8d-40b8-4d10-be27-f944af680df4", CellID->1010780199] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[26900, 734, 178, 7, 70, "Subsection",ExpressionUUID->"7f63ab72-d664-4372-a12d-86f229fc2119", CellID->461307998], Cell[27081, 743, 1076, 26, 70, "Text",ExpressionUUID->"ce0d1cba-42be-462c-927d-696f938bf151", CellID->1299093221], Cell[CellGroupData[{ Cell[28182, 773, 580, 16, 70, "Input",ExpressionUUID->"5464ead6-efec-44af-8b5f-8bce337c9d8f", CellID->1806677606], Cell[28765, 791, 430, 11, 70, "Output",ExpressionUUID->"c5272f6f-2b53-4677-8a00-d576f0998c76", CellID->291836944] }, Open ]], Cell[CellGroupData[{ Cell[29232, 807, 441, 12, 70, "Input",ExpressionUUID->"0cc6cbbe-0c77-4c57-9d42-0a54a84f6bdf", CellID->1917676007], Cell[29676, 821, 403, 10, 70, "Output",ExpressionUUID->"841ef02c-2b6d-447a-8f97-023b79aca034", CellID->1623574039] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[30128, 837, 168, 7, 70, "Subsection",ExpressionUUID->"ea378aa7-c86f-412b-aaca-16d9465f3641", CellID->95944414], Cell[30299, 846, 336, 9, 70, "Text",ExpressionUUID->"7db6df02-74e8-4959-bb4e-f77e90503cfa", CellID->56862166], Cell[CellGroupData[{ Cell[30660, 859, 7603, 195, 70, "Input",ExpressionUUID->"f7f337b6-8ec2-4672-945d-59c101093652", CellID->2085159666], Cell[38266, 1056, 523, 17, 70, "Output",ExpressionUUID->"896dc7e1-70b3-43e7-9f6a-ea436155b040", CellID->403571048] }, Open ]] }, Closed]] } ] *) (* End of internal cache information *)