Skip to main content
3 events
when toggle format what by license comment
May 25, 2020 at 14:14 comment added CA Trevillian Mr.Wizard, for the second example, you should just be able to use rep[{2, c : (1) ..} -> {2 + c}] -- oddly, though, this does not work. I think that has something to do with scoping of the contexts of the arguments when one uses symbols in this way? I think I said that correctly...
May 22, 2020 at 13:44 comment added J. M.'s missing motivation "I didn't quite follow your second example" - the OP just sorted the list reverse-lexicographically again afterwards, but {5, 2, 1, 1} maps to {5, 2 + 2}, and {2, 2, 2, 1, 1, 1} maps to {2, 2, 2 + 3}. Hopefully that clarifies the pattern for you.
May 22, 2020 at 13:38 history answered Mr.Wizard CC BY-SA 4.0