0
$\begingroup$

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

$\endgroup$
  • 1
    $\begingroup$ RulesToAssociations[rules_] := Replace[rules, r : {__Rule} :> Association[r], {0, Infinity}]? $\endgroup$ – Szabolcs Sep 30 '15 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$ – Szabolcs Sep 30 '15 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$ – SuTron Oct 8 '15 at 6:59