0
$\begingroup$

Considering a list of rules {A -> {A1-> B}} what will be the correct way to come to <|A -> <|A1-> B|>|>?

$\endgroup$
3
  • 1
    $\begingroup$ RulesToAssociations[rules_] := Replace[rules, r : {__Rule} :> Association[r], {0, Infinity}]? $\endgroup$ Commented Sep 30, 2015 at 9:24
  • 3
    $\begingroup$ Actually you have already asked the very same question and received several answers. Is there any problem with the solutions suggested there? $\endgroup$ Commented Sep 30, 2015 at 9:26
  • $\begingroup$ The issue is that the new functionality of associations does support lst //. x : {__Rule} :> Association[x] only with maximum iteration specification and returns list of associations, instead of associations. $\endgroup$ Commented Oct 8, 2015 at 6:59

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.