Timeline for Ways to protect certain parts of expressions
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 18, 2016 at 21:19 | comment | added | Mr.Wizard |
@Adam I was not able to reproduce that problem (v10.1.0 under Windows 7) but I think it may be caused by my use of Format instead of MakeBoxes , out of laziness. See (4119830).
|
|
Mar 17, 2016 at 21:22 | comment | added | Adam Law |
@Mr.Wizard First off, this solution is very helpful. In your example, have you noticed that if you assign the lindep function to a variable x = lindep[obj[{{0, 0}, {0, 1}}], 2] that ?x results in an error with infinite recursion? Are there some additional changes that can be made to fix this?
|
|
Feb 13, 2015 at 19:39 | comment | added | Mr.Wizard |
@Marius Don't be too quick to Accept an answer. (But thank you.) You can use li_obj if you like and it will be somewhat faster if applied a lot, but the longer pattern will make sure the data is not malformed. Regarding Format I remembered after posting that I probably should have used MakeBoxes instead; please see: (4112299)
|
|
Feb 13, 2015 at 17:34 | vote | accept | Marius Ladegård Meyer | ||
Feb 13, 2015 at 17:34 | comment | added | Marius Ladegård Meyer |
Thanks, using a custom head was my hunch. Also, using Format and Interpretation this way was new to me, cool! If I only plan on using the head obj for these lists, would there be any difference between your suggestion, and not defining p0 but simply defining functions like fn1[li_obj, k_] ?
|
|
Feb 13, 2015 at 12:11 | history | answered | Mr.Wizard | CC BY-SA 3.0 |