Timeline for Creating a Block from a list of rules
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 13, 2017 at 12:55 | history | edited | CommunityBot |
replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/
|
|
Sep 10, 2013 at 5:40 | vote | accept | Simon Woods | ||
Sep 5, 2013 at 16:02 | comment | added | Mr.Wizard | @Simon Yes, I should have explicitly stated that. I used it for the that reason in (19900). | |
Sep 5, 2013 at 15:39 | comment | added | Simon Woods |
Oh it's definitely useful. Another nice feature, I've just realised, is that if I have a chain of definitions like r1:={a->1}; r2:=r1; r3:=r2 I can use r3 and your code will recursively call ruleBlock until the symbol resolves to a list.
|
|
Sep 5, 2013 at 14:37 | comment | added | Mr.Wizard |
@Simon You're welcome. I wasn't sure if it would be useful to you. I think I finally figured out what I was trying to do re: := . One remaining issue: ruleBlock["null", code] returns "null" because "null" is inert. If you want the original expression returned you'll have to add a Condition.
|
|
Sep 5, 2013 at 14:35 | history | edited | Mr.Wizard | CC BY-SA 3.0 |
added 371 characters in body
|
Sep 5, 2013 at 14:24 | comment | added | Simon Woods |
This is great, thanks. Much more readable than mine, and as you say, more robust. I love the Block @@ Join[Hold[x], Hold[y]] construction - I always forget that Join works with any head.
|
|
Sep 5, 2013 at 13:53 | history | edited | Mr.Wizard | CC BY-SA 3.0 |
added 290 characters in body
|
Sep 5, 2013 at 13:23 | history | answered | Mr.Wizard | CC BY-SA 3.0 |